Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def bot_streaming(message, history):
|
|
65 |
|
66 |
inputs = processor(prompt, image, return_tensors="pt").to("cuda", torch.float16)
|
67 |
streamer = TextIteratorStreamer(processor, {"skip_special_tokens": True})
|
68 |
-
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=
|
69 |
generated_text = ""
|
70 |
|
71 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
|
|
65 |
|
66 |
inputs = processor(prompt, image, return_tensors="pt").to("cuda", torch.float16)
|
67 |
streamer = TextIteratorStreamer(processor, {"skip_special_tokens": True})
|
68 |
+
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=250)
|
69 |
generated_text = ""
|
70 |
|
71 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|