Spaces:
Running
on
Zero
Running
on
Zero
fix timestamps
Browse files- gradio_app.py +2 -2
gradio_app.py
CHANGED
|
@@ -25,7 +25,7 @@ def stream_output(query: str, continue_content: str = ""):
|
|
| 25 |
if size > MAX_SIZE:
|
| 26 |
raise gr.Error(f"Maximum size is {MAX_SIZE}. Duplicate this Space to remove this limit.")
|
| 27 |
content = continue_content
|
| 28 |
-
df = pd.read_json(io.StringIO(content), lines=True)
|
| 29 |
continue_content_size = len(df)
|
| 30 |
state_msg = f"⚙️ Generating... [{continue_content_size + 1}/{continue_content_size + size}]"
|
| 31 |
if list(df.columns):
|
|
@@ -41,7 +41,7 @@ def stream_output(query: str, continue_content: str = ""):
|
|
| 41 |
size=size,
|
| 42 |
)):
|
| 43 |
content += chunk
|
| 44 |
-
df = pd.read_json(io.StringIO(content), lines=True)
|
| 45 |
state_msg = f"⚙️ Generating... [{continue_content_size + i + 1}/{continue_content_size + size}]"
|
| 46 |
yield df, "```json\n" + content + "\n```", gr.Button(state_msg), gr.Button("Generate one more batch", interactive=False), gr.DownloadButton("⬇️ Download", interactive=False)
|
| 47 |
with open(query, "w", encoding="utf-8") as f:
|
|
|
|
| 25 |
if size > MAX_SIZE:
|
| 26 |
raise gr.Error(f"Maximum size is {MAX_SIZE}. Duplicate this Space to remove this limit.")
|
| 27 |
content = continue_content
|
| 28 |
+
df = pd.read_json(io.StringIO(content), lines=True, convert_dates=False)
|
| 29 |
continue_content_size = len(df)
|
| 30 |
state_msg = f"⚙️ Generating... [{continue_content_size + 1}/{continue_content_size + size}]"
|
| 31 |
if list(df.columns):
|
|
|
|
| 41 |
size=size,
|
| 42 |
)):
|
| 43 |
content += chunk
|
| 44 |
+
df = pd.read_json(io.StringIO(content), lines=True, convert_dates=False)
|
| 45 |
state_msg = f"⚙️ Generating... [{continue_content_size + i + 1}/{continue_content_size + size}]"
|
| 46 |
yield df, "```json\n" + content + "\n```", gr.Button(state_msg), gr.Button("Generate one more batch", interactive=False), gr.DownloadButton("⬇️ Download", interactive=False)
|
| 47 |
with open(query, "w", encoding="utf-8") as f:
|