Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def response_to_audio_conv(conversation, model=None, processor=None, temperature
|
|
| 30 |
for content in turn['content']:
|
| 31 |
if content["type"] == "text":
|
| 32 |
if contains_chinese(content["text"]):
|
| 33 |
-
return "
|
| 34 |
|
| 35 |
|
| 36 |
text = processor.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False)
|
|
@@ -60,7 +60,7 @@ def response_to_audio_conv(conversation, model=None, processor=None, temperature
|
|
| 60 |
output = model.generate([input], sampling_params=sampling_params)[0]
|
| 61 |
response = output.outputs[0].text
|
| 62 |
if contains_chinese(response):
|
| 63 |
-
return "ERROR! Try a different instruction/prompt!"
|
| 64 |
return response
|
| 65 |
|
| 66 |
def print_like_dislike(x: gr.LikeData):
|
|
|
|
| 30 |
for content in turn['content']:
|
| 31 |
if content["type"] == "text":
|
| 32 |
if contains_chinese(content["text"]):
|
| 33 |
+
return "ERROR! This demo does not support Chinese!"
|
| 34 |
|
| 35 |
|
| 36 |
text = processor.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False)
|
|
|
|
| 60 |
output = model.generate([input], sampling_params=sampling_params)[0]
|
| 61 |
response = output.outputs[0].text
|
| 62 |
if contains_chinese(response):
|
| 63 |
+
return "ERROR! This demo does not support Chinese! Try a different instruction/prompt!"
|
| 64 |
return response
|
| 65 |
|
| 66 |
def print_like_dislike(x: gr.LikeData):
|