asalhi85 commited on
Commit
48a9237
1 Parent(s): e5a63d9

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -89,11 +89,11 @@ with gr.Blocks(title=title,
89
  css=".gradio-container {background:white;}"
90
  ) as demo:
91
 
92
- gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">"Smartathon Phase2 Demo - Baseer"</div>""")
93
  #
94
- gr.HTML("""<h4 style="color:navy;">1- Select an example by clicking a thumbnail below.</h4>""")
95
  #
96
- gr.HTML("""<h4 style="color:navy;">2- Or upload an image by clicking on the canvas.</h4>""")
97
 
98
  with gr.Row():
99
  input_url = gr.Textbox(label="Image URL", placeholder="")
@@ -111,16 +111,19 @@ with gr.Blocks(title=title,
111
  gr.Examples(['./d1.jpeg', './d2.jpeg', './d3.jpeg','./d4.jpeg','./d5.jpeg','./d6.jpeg'], inputs=input_image)
112
 
113
  gr.HTML("""<br/>""")
114
- gr.HTML("""<h4 style="color:navy;">3- Then, click "Submit" button to predict object instances. It will take about 15-20 seconds (on cpu)</h4>""")
115
 
116
  send_btn = gr.Button("Submit")
 
 
 
117
  send_btn.click(fn=inference, inputs=[input_url,input_image,gr.Slider(minimum=0.0, maximum=1.0, value=0.4, label="Minimum score")], outputs=[output_image])
118
 
119
- # gr.HTML("""<br/>""")
120
- # gr.HTML("""<h4 style="color:navy;">Reference</h4>""")
121
- # gr.HTML("""<ul>""")
122
- # gr.HTML("""<li><a href="https://colab.research.google.com/drive/16jcaJoc6bCFAQ96jDe2HwtXj7BMD_-m5" target="_blank">Detectron2 Tutorial</a>""")
123
- # gr.HTML("""</ul>""")
124
 
125
 
126
  #demo.queue()
 
89
  css=".gradio-container {background:white;}"
90
  ) as demo:
91
 
92
+ gr.HTML("""<h4 style="font-weight:bold; text-align:center; color:navy;">"Smartathon Phase2 Demo - Baseer"</h4>""")
93
  #
94
+ gr.HTML("""<h5 style="color:navy;">1- Select an example by clicking a thumbnail below.</h5>""")
95
  #
96
+ gr.HTML("""<h5 style="color:navy;">2- Or upload an image by clicking on the canvas.</h5>""")
97
 
98
  with gr.Row():
99
  input_url = gr.Textbox(label="Image URL", placeholder="")
 
111
  gr.Examples(['./d1.jpeg', './d2.jpeg', './d3.jpeg','./d4.jpeg','./d5.jpeg','./d6.jpeg'], inputs=input_image)
112
 
113
  gr.HTML("""<br/>""")
114
+ gr.HTML("""<h5 style="color:navy;">3- Then, click "Submit" button to predict object instances. It will take about 15-20 seconds (on cpu)</h5>""")
115
 
116
  send_btn = gr.Button("Submit")
117
+
118
+ gr.HTML("""<h5 style="color:navy;">You can use this slider to control boxes min score: </h5>""")
119
+
120
  send_btn.click(fn=inference, inputs=[input_url,input_image,gr.Slider(minimum=0.0, maximum=1.0, value=0.4, label="Minimum score")], outputs=[output_image])
121
 
122
+ gr.HTML("""<br/>""")
123
+ gr.HTML("""<h5 style="color:navy;">Reference</h5>""")
124
+ gr.HTML("""<ul>""")
125
+ gr.HTML("""<li><a href="https://github.com/asalhi/Smartathon-Baseer" target="_blank">Baseer GitHub Repository</a>""")
126
+ gr.HTML("""</ul>""")
127
 
128
 
129
  #demo.queue()