Spaces:
Sleeping
Sleeping
vtrv.vls
commited on
Commit
·
409cbac
1
Parent(s):
451712e
Clear inputs on model change
Browse files
app.py
CHANGED
@@ -48,10 +48,11 @@ def model_gen(content, chat_history, model_type: str):
|
|
48 |
return gen(content, chat_history)
|
49 |
|
50 |
def model_regen(content, chat_history, model_type: str):
|
51 |
-
if
|
52 |
return '', []
|
53 |
-
if len(
|
54 |
return '', []
|
|
|
55 |
gen = MODEL_LIB[model_type]
|
56 |
|
57 |
msg = chat_history[-1][0]
|
|
|
48 |
return gen(content, chat_history)
|
49 |
|
50 |
def model_regen(content, chat_history, model_type: str):
|
51 |
+
if chat_history is None:
|
52 |
return '', []
|
53 |
+
if len(chat_history) == 0:
|
54 |
return '', []
|
55 |
+
|
56 |
gen = MODEL_LIB[model_type]
|
57 |
|
58 |
msg = chat_history[-1][0]
|