Spaces:
Runtime error
Runtime error
nguyenbh
commited on
Commit
·
c26e8e3
1
Parent(s):
56b7e8f
update examples
Browse files
app.py
CHANGED
|
@@ -563,7 +563,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 563 |
with gr.Row():
|
| 564 |
clear_btn = gr.ClearButton([chatbot, chat_input], value="Clear conversation")
|
| 565 |
clear_btn.click(lambda: [], None, conversation_state) # Also clear the conversation state
|
| 566 |
-
gr.HTML("<div style='text-align: right; margin-top: 5px;'><small>Powered by Microsoft</small></div>")
|
| 567 |
|
| 568 |
with gr.Column(scale=1):
|
| 569 |
with gr.Tab("Audio & Text"):
|
|
@@ -619,8 +619,8 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 619 |
img_example1_btn = gr.Button("Run it", size="sm")
|
| 620 |
|
| 621 |
# Example 2
|
| 622 |
-
gr.Markdown("Example 2: **
|
| 623 |
-
gr.Image("https://
|
| 624 |
img_example2_btn = gr.Button("Run it", size="sm")
|
| 625 |
|
| 626 |
# Define handlers for image examples
|
|
@@ -633,8 +633,8 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 633 |
|
| 634 |
def run_image_example2():
|
| 635 |
return process_image_example_direct(
|
| 636 |
-
"
|
| 637 |
-
"https://
|
| 638 |
[], []
|
| 639 |
)
|
| 640 |
|
|
@@ -655,8 +655,8 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 655 |
text_examples = gr.Examples(
|
| 656 |
examples=[
|
| 657 |
["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."],
|
| 658 |
-
["
|
| 659 |
-
["Explain the
|
| 660 |
],
|
| 661 |
inputs=chat_input,
|
| 662 |
label="Text Examples"
|
|
|
|
| 563 |
with gr.Row():
|
| 564 |
clear_btn = gr.ClearButton([chatbot, chat_input], value="Clear conversation")
|
| 565 |
clear_btn.click(lambda: [], None, conversation_state) # Also clear the conversation state
|
| 566 |
+
gr.HTML("<div style='text-align: right; margin-top: 5px;'><small>Powered by Microsoft [Phi-4-multimodal](https://aka.ms/phi-4-multimodal/azure) model on Azure AI. © 2025</small></div>")
|
| 567 |
|
| 568 |
with gr.Column(scale=1):
|
| 569 |
with gr.Tab("Audio & Text"):
|
|
|
|
| 619 |
img_example1_btn = gr.Button("Run it", size="sm")
|
| 620 |
|
| 621 |
# Example 2
|
| 622 |
+
gr.Markdown("Example 2: **convert the chart to a markdown table**")
|
| 623 |
+
gr.Image("https://pub-c2c1d9230f0b4abb9b0d2d95e06fd4ef.r2.dev/sites/566/2024/09/Screenshot-2024-09-16-115417.png", label="Preview")
|
| 624 |
img_example2_btn = gr.Button("Run it", size="sm")
|
| 625 |
|
| 626 |
# Define handlers for image examples
|
|
|
|
| 633 |
|
| 634 |
def run_image_example2():
|
| 635 |
return process_image_example_direct(
|
| 636 |
+
"convert the chart to a markdown table",
|
| 637 |
+
"https://pub-c2c1d9230f0b4abb9b0d2d95e06fd4ef.r2.dev/sites/566/2024/09/Screenshot-2024-09-16-115417.png",
|
| 638 |
[], []
|
| 639 |
)
|
| 640 |
|
|
|
|
| 655 |
text_examples = gr.Examples(
|
| 656 |
examples=[
|
| 657 |
["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."],
|
| 658 |
+
["Coffee shops have been slimming down their menus lately. Is less choice making our coffee runs better or do we miss the variety?"],
|
| 659 |
+
["Explain the Transformer model to a medieval knight"],
|
| 660 |
],
|
| 661 |
inputs=chat_input,
|
| 662 |
label="Text Examples"
|