Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def bot_streaming(message, history):
|
|
37 |
inputs = processor(prompt, image, return_tensors="pt").to("cuda:0")
|
38 |
|
39 |
streamer = TextIteratorStreamer(processor, **{"skip_special_tokens": True})
|
40 |
-
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=
|
41 |
generated_text = ""
|
42 |
|
43 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
|
|
37 |
inputs = processor(prompt, image, return_tensors="pt").to("cuda:0")
|
38 |
|
39 |
streamer = TextIteratorStreamer(processor, **{"skip_special_tokens": True})
|
40 |
+
generation_kwargs = dict(inputs, streamer=streamer, max_new_tokens=512)
|
41 |
generated_text = ""
|
42 |
|
43 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|