Spaces:
Runtime error
Runtime error
edited output for the image
Browse files
app.py
CHANGED
@@ -227,7 +227,7 @@ def process_and_query(text=None, image=None, audio=None):
|
|
227 |
# If an image is provided, process it with OpenAI and use the response as the text query for Vectara
|
228 |
if image is not None:
|
229 |
text = process_image(image)
|
230 |
-
return text
|
231 |
if audio is not None:
|
232 |
text = process_speech(audio)
|
233 |
# augment the prompt before feeding it to vectara
|
@@ -260,7 +260,7 @@ iface = gr.Interface(
|
|
260 |
inputs=[
|
261 |
gr.Textbox(label="Input Text"),
|
262 |
gr.Image(label="Upload Image"),
|
263 |
-
gr.Audio(label="talk", type="filepath",
|
264 |
sources="microphone", visible=True),
|
265 |
],
|
266 |
outputs=[gr.Markdown(label="Output Text")],
|
|
|
227 |
# If an image is provided, process it with OpenAI and use the response as the text query for Vectara
|
228 |
if image is not None:
|
229 |
text = process_image(image)
|
230 |
+
return "**Summary:** "+text
|
231 |
if audio is not None:
|
232 |
text = process_speech(audio)
|
233 |
# augment the prompt before feeding it to vectara
|
|
|
260 |
inputs=[
|
261 |
gr.Textbox(label="Input Text"),
|
262 |
gr.Image(label="Upload Image"),
|
263 |
+
gr.Audio(label="talk in french", type="filepath",
|
264 |
sources="microphone", visible=True),
|
265 |
],
|
266 |
outputs=[gr.Markdown(label="Output Text")],
|