davanstrien HF staff commited on
Commit
7b6a165
β€’
1 Parent(s): 4011b8e

description

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -129,8 +129,18 @@ def generate_response(image):
129
  try:
130
  return json.loads(output_text[0])
131
  except Exception:
 
132
  return {}
133
 
134
 
135
- demo = gr.Interface(fn=generate_response, inputs=gr.Image(type="pil"), outputs="json")
 
 
 
 
 
 
 
 
 
136
  demo.launch()
 
129
  try:
130
  return json.loads(output_text[0])
131
  except Exception:
132
+ gr.Warning("Failed to parse JSON from output")
133
  return {}
134
 
135
 
136
+ title = "ColPali Query Generator"
137
+ description = "This Space uses the Qwen2-VL model to generate queries for document retrieval tasks primarily focused on ColPali fine-tuning data."
138
+
139
+ demo = gr.Interface(
140
+ fn=generate_response,
141
+ inputs=gr.Image(type="pil"),
142
+ outputs=gr.Json(),
143
+ title=title,
144
+ description=description,
145
+ )
146
  demo.launch()