Omnibus commited on
Commit
c9eb8a2
·
1 Parent(s): c0cd7e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -61,7 +61,7 @@ def aiornot0(image):
61
  AI: {px[1][0]}"""
62
  results = {}
63
  for idx,result in enumerate(px):
64
- results[labels[idx]] = pdx[idx][0]
65
  #results[labels['label']] = result['score']
66
  return gr.HTML.update(html_out),results
67
  def aiornot1(image):
@@ -113,17 +113,17 @@ with gr.Blocks() as app:
113
  with gr.Group():
114
  with gr.Row():
115
  with gr.Box():
116
- lab0 = gr.HTML(f"""Testing on Model: {models[0]}""")
117
  outp0 = gr.HTML("""""")
118
- n_out0=gr.Label()
119
  with gr.Box():
120
- lab1 = gr.HTML(f"""Testing on Model: {models[1]}""")
121
  outp1 = gr.HTML("""""")
122
- n_out1=gr.Label()
123
  with gr.Box():
124
- lab2 = gr.HTML(f"""Testing on Model: {models[2]}""")
125
  outp2 = gr.HTML("""""")
126
- n_out2=gr.Label()
127
  btn.click(aiornot0,[inp],[outp0,n_out0])
128
  btn.click(aiornot1,[inp],outp1)
129
  btn.click(aiornot2,[inp],outp2)
 
61
  AI: {px[1][0]}"""
62
  results = {}
63
  for idx,result in enumerate(px):
64
+ results[labels[idx]] = px[idx][0]
65
  #results[labels['label']] = result['score']
66
  return gr.HTML.update(html_out),results
67
  def aiornot1(image):
 
113
  with gr.Group():
114
  with gr.Row():
115
  with gr.Box():
116
+ lab0 = gr.HTML(f"""<b>Testing on Model: {models[0]}</b>""")
117
  outp0 = gr.HTML("""""")
118
+ n_out0=gr.Label(label="Output")
119
  with gr.Box():
120
+ lab1 = gr.HTML(f"""<b>Testing on Model: {models[1]}</b>""")
121
  outp1 = gr.HTML("""""")
122
+ n_out1=gr.Label(label="Output")
123
  with gr.Box():
124
+ lab2 = gr.HTML(f"""<b>Testing on Model: {models[2]}</b>""")
125
  outp2 = gr.HTML("""""")
126
+ n_out2=gr.Label(label="Output")
127
  btn.click(aiornot0,[inp],[outp0,n_out0])
128
  btn.click(aiornot1,[inp],outp1)
129
  btn.click(aiornot2,[inp],outp2)