Spaces:
Running
on
Zero
Running
on
Zero
test
Browse files- gradio_app.py +4 -2
gradio_app.py
CHANGED
@@ -5,11 +5,13 @@ import io
|
|
5 |
import pandas as pd
|
6 |
import spaces
|
7 |
|
|
|
|
|
|
|
8 |
@spaces.GPU(duration=120)
|
9 |
def stream_output(filename: str):
|
10 |
if filename.endswith(".jsonl"):
|
11 |
filename = filename[:-len(".jsonl")]
|
12 |
-
from generate import stream_file
|
13 |
content = ""
|
14 |
size=3
|
15 |
start_time = time.time()
|
@@ -71,7 +73,7 @@ with gr.Blocks() as demo:
|
|
71 |
with gr.Row():
|
72 |
file_content_comp = gr.Markdown()
|
73 |
|
74 |
-
generate_button.click(
|
75 |
|
76 |
|
77 |
demo.launch()
|
|
|
5 |
import pandas as pd
|
6 |
import spaces
|
7 |
|
8 |
+
from generate import stream_file
|
9 |
+
|
10 |
+
|
11 |
@spaces.GPU(duration=120)
|
12 |
def stream_output(filename: str):
|
13 |
if filename.endswith(".jsonl"):
|
14 |
filename = filename[:-len(".jsonl")]
|
|
|
15 |
content = ""
|
16 |
size=3
|
17 |
start_time = time.time()
|
|
|
73 |
with gr.Row():
|
74 |
file_content_comp = gr.Markdown()
|
75 |
|
76 |
+
generate_button.click(stream_output, filename_comp, [dataframe_comp, file_content_comp, state_msg_comp])
|
77 |
|
78 |
|
79 |
demo.launch()
|