qingshan777 commited on
Commit
00900af
·
verified ·
1 Parent(s): 613c0f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -84,7 +84,7 @@ def Retrieval(image, candidate_labels, text_type):
84
 
85
 
86
  def infer(image, candidate_labels, text_type):
87
- assert text_type in ["short","long", "box"]
88
  candidate_labels = ast.literal_eval(candidate_labels)
89
  fg_probs = Retrieval(image, candidate_labels,text_type)
90
  return postprocess_result(fg_probs,candidate_labels)
@@ -135,4 +135,4 @@ with gr.Blocks() as demo:
135
  run_button.click(fn=infer, inputs=[image_input, text_input, text_type], outputs=fg_output)
136
 
137
  # demo.launch(server_name="0.0.0.0", server_port=7861, share=True)
138
- demo.launch(share=True)
 
84
 
85
 
86
  def infer(image, candidate_labels, text_type):
87
+ # assert text_type in ["short","long", "box"]
88
  candidate_labels = ast.literal_eval(candidate_labels)
89
  fg_probs = Retrieval(image, candidate_labels,text_type)
90
  return postprocess_result(fg_probs,candidate_labels)
 
135
  run_button.click(fn=infer, inputs=[image_input, text_input, text_type], outputs=fg_output)
136
 
137
  # demo.launch(server_name="0.0.0.0", server_port=7861, share=True)
138
+ demo.launch()