Spaces:
Sleeping
Sleeping
Update src/app.py
Browse files- src/app.py +11 -17
src/app.py
CHANGED
|
@@ -251,12 +251,7 @@ def clear_chat():
|
|
| 251 |
# -------------------------------
|
| 252 |
with gr.Blocks(
|
| 253 |
title="Multimodal RAG Video Chat",
|
| 254 |
-
theme=gr.themes.
|
| 255 |
-
css="""
|
| 256 |
-
.gradio-container {
|
| 257 |
-
max-width: 1200px !important;
|
| 258 |
-
}
|
| 259 |
-
"""
|
| 260 |
) as demo:
|
| 261 |
gr.Markdown("""
|
| 262 |
# 🎬 Multimodal RAG Video Chat
|
|
@@ -294,10 +289,7 @@ with gr.Blocks(
|
|
| 294 |
with gr.Column(scale=2):
|
| 295 |
chatbot = gr.Chatbot(
|
| 296 |
label="Chat about the video",
|
| 297 |
-
height=500
|
| 298 |
-
show_label=True,
|
| 299 |
-
avatar_images=None,
|
| 300 |
-
bubble_full_width=False
|
| 301 |
)
|
| 302 |
|
| 303 |
with gr.Column(scale=1):
|
|
@@ -416,10 +408,12 @@ if __name__ == "__main__":
|
|
| 416 |
print(" Please set this in your HuggingFace Space settings")
|
| 417 |
|
| 418 |
# Launch with appropriate settings for HF Spaces
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
|
|
|
|
|
|
|
|
| 251 |
# -------------------------------
|
| 252 |
with gr.Blocks(
|
| 253 |
title="Multimodal RAG Video Chat",
|
| 254 |
+
theme=gr.themes.Default()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
) as demo:
|
| 256 |
gr.Markdown("""
|
| 257 |
# 🎬 Multimodal RAG Video Chat
|
|
|
|
| 289 |
with gr.Column(scale=2):
|
| 290 |
chatbot = gr.Chatbot(
|
| 291 |
label="Chat about the video",
|
| 292 |
+
height=500
|
|
|
|
|
|
|
|
|
|
| 293 |
)
|
| 294 |
|
| 295 |
with gr.Column(scale=1):
|
|
|
|
| 408 |
print(" Please set this in your HuggingFace Space settings")
|
| 409 |
|
| 410 |
# Launch with appropriate settings for HF Spaces
|
| 411 |
+
if IS_SPACES:
|
| 412 |
+
demo.launch() # Use default settings for HF Spaces
|
| 413 |
+
else:
|
| 414 |
+
demo.launch(
|
| 415 |
+
server_name="0.0.0.0",
|
| 416 |
+
server_port=7860,
|
| 417 |
+
share=False,
|
| 418 |
+
show_error=True
|
| 419 |
+
)
|