acecalisto3 commited on
Commit
b5a44cc
·
verified ·
1 Parent(s): 60499e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- history = json.loads(history) if history else []
 
 
 
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