Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -89,16 +89,14 @@ with gr.Blocks() as demo:
|
|
89 |
# Creating a column with a scale of 2
|
90 |
with gr.Row():
|
91 |
# Adding image
|
92 |
-
image = gr.Image(type="filepath",
|
93 |
-
# image = gr.Image(type="filepath", value=None)
|
94 |
# Creating a column with a scale of 2
|
95 |
with gr.Row():
|
96 |
# Add audio
|
97 |
-
audio_upload = gr.Audio(
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
# )
|
102 |
|
103 |
with gr.Column(scale=8):
|
104 |
with gr.Box():
|
@@ -114,21 +112,17 @@ with gr.Blocks() as demo:
|
|
114 |
|
115 |
submit.click(
|
116 |
add_content,
|
117 |
-
inputs=[chatbot, prompt, image, audio_upload],
|
118 |
-
# inputs=[chatbot, prompt, image, audio_upload, audio_mic],
|
119 |
outputs=[chatbot],
|
120 |
).success(
|
121 |
run,
|
122 |
-
inputs=[chatbot, prompt, image, audio_upload],
|
123 |
-
outputs=[chatbot, prompt, image, audio_upload],
|
124 |
-
# inputs=[chatbot, prompt, image, audio_upload, audio_mic],
|
125 |
-
# outputs=[chatbot, prompt, image, audio_upload, audio_mic],
|
126 |
)
|
127 |
|
128 |
clear.click(
|
129 |
clear_data,
|
130 |
-
outputs=[prompt, image, audio_upload, chatbot],
|
131 |
-
# outputs=[prompt, image, audio_upload, audio_mic, chatbot],
|
132 |
)
|
133 |
|
134 |
demo.launch()
|
|
|
89 |
# Creating a column with a scale of 2
|
90 |
with gr.Row():
|
91 |
# Adding image
|
92 |
+
image = gr.Image(type="filepath", value=None)
|
|
|
93 |
# Creating a column with a scale of 2
|
94 |
with gr.Row():
|
95 |
# Add audio
|
96 |
+
audio_upload = gr.Audio(source="upload", type="filepath")
|
97 |
+
audio_mic = gr.Audio(
|
98 |
+
source="microphone", type="filepath", format="mp3"
|
99 |
+
)
|
|
|
100 |
|
101 |
with gr.Column(scale=8):
|
102 |
with gr.Box():
|
|
|
112 |
|
113 |
submit.click(
|
114 |
add_content,
|
115 |
+
inputs=[chatbot, prompt, image, audio_upload, audio_mic],
|
|
|
116 |
outputs=[chatbot],
|
117 |
).success(
|
118 |
run,
|
119 |
+
inputs=[chatbot, prompt, image, audio_upload, audio_mic],
|
120 |
+
outputs=[chatbot, prompt, image, audio_upload, audio_mic],
|
|
|
|
|
121 |
)
|
122 |
|
123 |
clear.click(
|
124 |
clear_data,
|
125 |
+
outputs=[prompt, image, audio_upload, audio_mic, chatbot],
|
|
|
126 |
)
|
127 |
|
128 |
demo.launch()
|