saritha5 commited on
Commit
9c01df3
·
1 Parent(s): ee9820d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -129,7 +129,7 @@ def prediction(image_path):
129
  response = {"predictions": [result]}
130
  total_time_end = time.time()
131
  print("total time : ",round((total_time_end-total_time_start),2))
132
- st.write(str(simplejson.dumps(response)))
133
 
134
  inputs = gr.inputs.Image(type = 'filepath')
135
  EXAMPLES = ["img1.jpg","img2.jpg","img3.jpg","img4.jpg"]
@@ -141,7 +141,7 @@ DESCRIPTION = """An image is occluded if the image is blocked by any object.
141
  demo_app = gr.Interface(
142
  fn= prediction,
143
  inputs=inputs,
144
- outputs= "image",
145
  title = "Tag Diciphering",
146
  description = DESCRIPTION,
147
  examples = EXAMPLES,
 
129
  response = {"predictions": [result]}
130
  total_time_end = time.time()
131
  print("total time : ",round((total_time_end-total_time_start),2))
132
+ return simplejson.dumps(response)
133
 
134
  inputs = gr.inputs.Image(type = 'filepath')
135
  EXAMPLES = ["img1.jpg","img2.jpg","img3.jpg","img4.jpg"]
 
141
  demo_app = gr.Interface(
142
  fn= prediction,
143
  inputs=inputs,
144
+ outputs= "text",
145
  title = "Tag Diciphering",
146
  description = DESCRIPTION,
147
  examples = EXAMPLES,