cyrus28214 commited on
Commit
8afd5a6
·
unverified ·
1 Parent(s): 1c11800
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -14,7 +14,7 @@ model = AutoModelForImageTextToText.from_pretrained(
14
  ).to("cuda").eval()
15
 
16
  @spaces.GPU
17
- def model_inference(input_dict, history):
18
  text = input_dict["text"]
19
  files = input_dict["files"]
20
 
@@ -85,15 +85,9 @@ def model_inference(input_dict, history):
85
  buffer += new_text
86
  yield buffer
87
 
88
- with gr.Blocks() as demo:
89
- gr.ChatInterface(
90
- fn=model_inference,
91
- description="# **VL-Rethinker-7B**",
92
- fill_height=True,
93
- textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image"], file_count="multiple"),
94
- stop_btn="Stop Generation",
95
  multimodal=True,
96
- cache_examples=False,
97
  )
98
 
99
  demo.launch(debug=True)
 
14
  ).to("cuda").eval()
15
 
16
  @spaces.GPU
17
+ def inference(input_dict, history):
18
  text = input_dict["text"]
19
  files = input_dict["files"]
20
 
 
85
  buffer += new_text
86
  yield buffer
87
 
88
+ demo = gr.ChatInterface(
89
+ fn=inference,
 
 
 
 
 
90
  multimodal=True,
 
91
  )
92
 
93
  demo.launch(debug=True)