Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -184,22 +184,12 @@ def gradio_worker(
|
|
184 |
msg = ""
|
185 |
return chatbot, msg
|
186 |
|
187 |
-
def
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
'Point Cloud': 'point',
|
194 |
-
'IMU': 'imu',
|
195 |
-
'fMRI': 'fmri',
|
196 |
-
'Depth Map': 'rgbd',
|
197 |
-
'Normal Map': 'rgbn'
|
198 |
-
}
|
199 |
-
print(tab.label)
|
200 |
-
if tab.label in label_modal_dict:
|
201 |
-
modality = label_modal_dict[tab.label]
|
202 |
-
return modality
|
203 |
|
204 |
CSS ="""
|
205 |
.contain { display: flex; flex-direction: column; }
|
@@ -247,9 +237,9 @@ def gradio_worker(
|
|
247 |
label="Top-p",
|
248 |
)
|
249 |
|
250 |
-
img_tab.select(
|
251 |
-
video_tab.select(
|
252 |
-
audio_tab.select(
|
253 |
|
254 |
msg.submit(
|
255 |
show_user_input, [msg, chatbot], [msg, chatbot],
|
|
|
184 |
msg = ""
|
185 |
return chatbot, msg
|
186 |
|
187 |
+
def change_modality_image():
|
188 |
+
return 'image'
|
189 |
+
def change_modality_video():
|
190 |
+
return 'video'
|
191 |
+
def change_modality_audio():
|
192 |
+
return 'audio'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
CSS ="""
|
195 |
.contain { display: flex; flex-direction: column; }
|
|
|
237 |
label="Top-p",
|
238 |
)
|
239 |
|
240 |
+
img_tab.select(change_modality_image, [], [modality])
|
241 |
+
video_tab.select(change_modality_video, [], [modality])
|
242 |
+
audio_tab.select(change_modality_audio, [], [modality])
|
243 |
|
244 |
msg.submit(
|
245 |
show_user_input, [msg, chatbot], [msg, chatbot],
|