gizemsarsinlar commited on
Commit
b3411a5
1 Parent(s): 6226f5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -50,7 +50,8 @@ css = """
50
  """
51
 
52
  with gr.Blocks(css=css) as demo:
53
- gr.Markdown()
 
54
  with gr.Tab(label="Phi-3.5 Input"):
55
  with gr.Row():
56
  with gr.Column():
@@ -61,7 +62,22 @@ with gr.Blocks(css=css) as demo:
61
  with gr.Column():
62
  output_text = gr.Textbox(label="Output Text")
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  submit_btn.click(run_example, [input_img, text_input, model_selector], [output_text])
65
 
 
66
  demo.queue(api_open=False)
67
  demo.launch(debug=True, show_api=False)
 
50
  """
51
 
52
  with gr.Blocks(css=css) as demo:
53
+ gr.Markdown("## Phi-3.5 Vision Instruct Demo with Example Inputs")
54
+
55
  with gr.Tab(label="Phi-3.5 Input"):
56
  with gr.Row():
57
  with gr.Column():
 
62
  with gr.Column():
63
  output_text = gr.Textbox(label="Output Text")
64
 
65
+ # Example images and text
66
+ examples = [
67
+ ["image1.jpeg", "What does this painting tell us explain in detail?"],
68
+ ["image2.jpg", "Describe the scene in this picture."],
69
+ ["image3.jpg", "Describe the scene in this picture."]
70
+ ]
71
+
72
+ # Adding Examples
73
+ gr.Examples(
74
+ examples=examples,
75
+ inputs=[input_img, text_input],
76
+ examples_per_page=3
77
+ )
78
+
79
  submit_btn.click(run_example, [input_img, text_input, model_selector], [output_text])
80
 
81
+ # Launch the demo
82
  demo.queue(api_open=False)
83
  demo.launch(debug=True, show_api=False)