wenhu commited on
Commit
b60bc3a
·
verified ·
1 Parent(s): 734b5e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -14,10 +14,7 @@ from serve_constants import html_header, bibtext, learn_more_markdown, tos_markd
14
  cur_dir = os.path.dirname(os.path.abspath(__file__))
15
 
16
  MODEL_ID = "TIGER-Lab/PixelReasoner-RL-v1"
17
- example_image = "example_images/1.jpg"
18
 
19
- print(example_image)
20
- example_text = "What kind of restaurant is it?"
21
  processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True,
22
  max_pixels=512*28*28)
23
  model = AutoModelForImageTextToText.from_pretrained(
@@ -259,10 +256,11 @@ def model_inference(input_dict, history):
259
  with gr.Blocks() as demo:
260
  examples = [
261
  [
262
- {"text": example_text,
263
- "files": [
264
- example_image
265
- ]
 
266
  }
267
  ]
268
  ]
 
14
  cur_dir = os.path.dirname(os.path.abspath(__file__))
15
 
16
  MODEL_ID = "TIGER-Lab/PixelReasoner-RL-v1"
 
17
 
 
 
18
  processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True,
19
  max_pixels=512*28*28)
20
  model = AutoModelForImageTextToText.from_pretrained(
 
256
  with gr.Blocks() as demo:
257
  examples = [
258
  [
259
+ {
260
+ "text": "What kind of restaurant is it?",
261
+ "files": [
262
+ "example_images/1.jpg"
263
+ ]
264
  }
265
  ]
266
  ]