Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -308,7 +308,10 @@ def generate_text_chunked(input_text, model, generation_parameters, max_tokens_t
|
|
308 |
|
309 |
# Gradio Interface
|
310 |
def gradio_interface(purpose, history):
|
311 |
-
|
|
|
|
|
|
|
312 |
result = run(purpose, history)
|
313 |
return next(result)
|
314 |
|
|
|
308 |
|
309 |
# Gradio Interface
|
310 |
def gradio_interface(purpose, history):
|
311 |
+
try:
|
312 |
+
history = json.loads(history) if history else []
|
313 |
+
except json.JSONDecodeError:
|
314 |
+
history = []
|
315 |
result = run(purpose, history)
|
316 |
return next(result)
|
317 |
|