Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def read(filename):
|
|
19 |
|
20 |
sys_prompt = read('system_prompt.txt')
|
21 |
|
22 |
-
def process_text(text_input,unit):
|
23 |
if text_input:
|
24 |
completion = client.chat.completions.create(
|
25 |
model=MODEL,
|
@@ -28,7 +28,7 @@ def process_text(text_input,unit):
|
|
28 |
{"role": "user", "content": f"Hello! Could you solve {text_input}?"}
|
29 |
]
|
30 |
)
|
31 |
-
return
|
32 |
|
33 |
def process_image(image_input,unit):
|
34 |
if image_input is not None:
|
|
|
19 |
|
20 |
sys_prompt = read('system_prompt.txt')
|
21 |
|
22 |
+
def process_text(text_input, unit):
|
23 |
if text_input:
|
24 |
completion = client.chat.completions.create(
|
25 |
model=MODEL,
|
|
|
28 |
{"role": "user", "content": f"Hello! Could you solve {text_input}?"}
|
29 |
]
|
30 |
)
|
31 |
+
return completion.choices[0].message.content
|
32 |
|
33 |
def process_image(image_input,unit):
|
34 |
if image_input is not None:
|