Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def bot_streaming(message, history):
|
|
32 |
|
33 |
if image is None:
|
34 |
gr.Error("You need to upload an image for LLaVA to work.")
|
35 |
-
prompt=f"[INST] <image>\n{message['text']} [/INST]"
|
36 |
image = Image.open(image).convert("RGB")
|
37 |
inputs = processor(prompt, image, return_tensors="pt").to("cuda:0")
|
38 |
|
@@ -43,7 +43,7 @@ def bot_streaming(message, history):
|
|
43 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
44 |
thread.start()
|
45 |
|
46 |
-
text_prompt =f"[INST] \n{message['text']} [/INST]"
|
47 |
|
48 |
|
49 |
buffer = ""
|
|
|
32 |
|
33 |
if image is None:
|
34 |
gr.Error("You need to upload an image for LLaVA to work.")
|
35 |
+
prompt=f"USER: <image>\n{message['text']}\nASSISTANT:" #f"[INST] <image>\n{message['text']} [/INST]"
|
36 |
image = Image.open(image).convert("RGB")
|
37 |
inputs = processor(prompt, image, return_tensors="pt").to("cuda:0")
|
38 |
|
|
|
43 |
thread = Thread(target=model.generate, kwargs=generation_kwargs)
|
44 |
thread.start()
|
45 |
|
46 |
+
text_prompt =f"USER: \n{message['text']}\nASSISTANT:" #f"[INST] \n{message['text']} [/INST]"
|
47 |
|
48 |
|
49 |
buffer = ""
|