Update app.py
Browse files
app.py
CHANGED
|
@@ -113,7 +113,7 @@ def model_inference(input_dict, history):
|
|
| 113 |
raise gr.Error("Could not process video.") # Fixed: gr.Error syntax
|
| 114 |
# Build messages: start with the text prompt.
|
| 115 |
messages = [
|
| 116 |
-
{"role": "system", "content": "Answer clearly to the user's requesst. Please do not use numbers, only letters. If you want to answer with a number, convert it to letters. For example, you should not say 'am an 2 xaj' but 'am an Γ±aari xaj.'"},
|
| 117 |
{
|
| 118 |
"role": "user",
|
| 119 |
"content": [{"type": "text", "text": text}]
|
|
@@ -158,7 +158,7 @@ def model_inference(input_dict, history):
|
|
| 158 |
raise gr.Error("Please input a text query along with the image(s).") # Fixed: gr.Error syntax
|
| 159 |
|
| 160 |
messages = [
|
| 161 |
-
{"role": "system", "content": "Answer clearly to the user's requesst. Please do not use numbers, only letters. If you want to answer with a number, convert it to letters. For example, you should not say 'am an 2 xaj' but 'am an Γ±aari xaj.'"},
|
| 162 |
{
|
| 163 |
"role": "user",
|
| 164 |
"content": [
|
|
|
|
| 113 |
raise gr.Error("Could not process video.") # Fixed: gr.Error syntax
|
| 114 |
# Build messages: start with the text prompt.
|
| 115 |
messages = [
|
| 116 |
+
# {"role": "system", "content": "Answer clearly to the user's requesst. Please do not use numbers, only letters. If you want to answer with a number, convert it to letters. For example, you should not say 'am an 2 xaj' but 'am an Γ±aari xaj.'"},
|
| 117 |
{
|
| 118 |
"role": "user",
|
| 119 |
"content": [{"type": "text", "text": text}]
|
|
|
|
| 158 |
raise gr.Error("Please input a text query along with the image(s).") # Fixed: gr.Error syntax
|
| 159 |
|
| 160 |
messages = [
|
| 161 |
+
# {"role": "system", "content": "Answer clearly to the user's requesst. Please do not use numbers, only letters. If you want to answer with a number, convert it to letters. For example, you should not say 'am an 2 xaj' but 'am an Γ±aari xaj.'"},
|
| 162 |
{
|
| 163 |
"role": "user",
|
| 164 |
"content": [
|