Spaces:
Running
Running
nguyenbh
commited on
Commit
·
fd1391b
1
Parent(s):
b8d2774
Update UI
Browse files
app.py
CHANGED
@@ -503,23 +503,10 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
503 |
with gr.Row():
|
504 |
clear_btn = gr.ClearButton([chatbot, chat_input], value="Clear conversation")
|
505 |
clear_btn.click(lambda: [], None, conversation_state) # Also clear the conversation state
|
506 |
-
gr.HTML("<div style='text-align: right; margin-top: 5px;'><small>Powered by
|
507 |
|
508 |
with gr.Column(scale=1):
|
509 |
-
gr.
|
510 |
-
|
511 |
-
with gr.Tab("Text Only"):
|
512 |
-
text_examples = gr.Examples(
|
513 |
-
examples=[
|
514 |
-
["Tell me about Microsoft Azure cloud services."],
|
515 |
-
["What can you help me with today?"],
|
516 |
-
["Explain the difference between AI and machine learning."],
|
517 |
-
],
|
518 |
-
inputs=chat_input,
|
519 |
-
label="Text Examples"
|
520 |
-
)
|
521 |
-
|
522 |
-
with gr.Tab("Text & Audio"):
|
523 |
gr.Markdown("### Audio Examples")
|
524 |
|
525 |
# Example 1
|
@@ -565,9 +552,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
565 |
outputs=[chatbot, conversation_state]
|
566 |
)
|
567 |
|
568 |
-
with gr.Tab("
|
569 |
-
gr.Markdown("### Image Examples")
|
570 |
-
|
571 |
# Example 1
|
572 |
gr.Markdown("**Example 1: What's in this image?**")
|
573 |
gr.Image("https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Hanoi_Temple_of_Literature.jpg/640px-Hanoi_Temple_of_Literature.jpg", label="Preview")
|
@@ -606,6 +591,17 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
606 |
inputs=[],
|
607 |
outputs=[chatbot, conversation_state]
|
608 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
609 |
|
610 |
gr.Markdown("### Instructions")
|
611 |
gr.Markdown("""
|
|
|
503 |
with gr.Row():
|
504 |
clear_btn = gr.ClearButton([chatbot, chat_input], value="Clear conversation")
|
505 |
clear_btn.click(lambda: [], None, conversation_state) # Also clear the conversation state
|
506 |
+
gr.HTML("<div style='text-align: right; margin-top: 5px;'><small>Powered by Microsoft</small></div>")
|
507 |
|
508 |
with gr.Column(scale=1):
|
509 |
+
with gr.Tab("Audio & Text"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
gr.Markdown("### Audio Examples")
|
511 |
|
512 |
# Example 1
|
|
|
552 |
outputs=[chatbot, conversation_state]
|
553 |
)
|
554 |
|
555 |
+
with gr.Tab("Image & Text"):
|
|
|
|
|
556 |
# Example 1
|
557 |
gr.Markdown("**Example 1: What's in this image?**")
|
558 |
gr.Image("https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Hanoi_Temple_of_Literature.jpg/640px-Hanoi_Temple_of_Literature.jpg", label="Preview")
|
|
|
591 |
inputs=[],
|
592 |
outputs=[chatbot, conversation_state]
|
593 |
)
|
594 |
+
|
595 |
+
with gr.Tab("Text Only"):
|
596 |
+
text_examples = gr.Examples(
|
597 |
+
examples=[
|
598 |
+
["I'd like to buy a new car. Start by asking me about my budget and which features I care most about, then provide a recommendation."],
|
599 |
+
["What can you help me with today?"],
|
600 |
+
["Explain the difference between AI and machine learning."],
|
601 |
+
],
|
602 |
+
inputs=chat_input,
|
603 |
+
label="Text Examples"
|
604 |
+
)
|
605 |
|
606 |
gr.Markdown("### Instructions")
|
607 |
gr.Markdown("""
|