Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from transformers import BitsAndBytesConfig, pipeline
|
|
8 |
import re
|
9 |
import time
|
10 |
|
11 |
-
DESCRIPTION = "# LLaVA
|
12 |
|
13 |
model_id = "llava-hf/llava-1.5-7b-hf"
|
14 |
quantization_config = BitsAndBytesConfig(
|
@@ -69,7 +69,7 @@ def bot(history_chat, text_input, image,
|
|
69 |
if image==None:
|
70 |
gr.Warning("Please input image or wait for image to be uploaded before clicking submit.")
|
71 |
chat_history = " ".join(history_chat) # history as a str to be passed to model
|
72 |
-
chat_history = chat_history + f"USER: <image>\n{text_input}\nASSISTANT:" # add text input for prompting
|
73 |
inference_result = infer(image, chat_history,
|
74 |
temperature,
|
75 |
length_penalty,
|
|
|
8 |
import re
|
9 |
import time
|
10 |
|
11 |
+
DESCRIPTION = "# LLaVA πͺ - THE IRON PUMPING MACHINE VISION BEAST"
|
12 |
|
13 |
model_id = "llava-hf/llava-1.5-7b-hf"
|
14 |
quantization_config = BitsAndBytesConfig(
|
|
|
69 |
if image==None:
|
70 |
gr.Warning("Please input image or wait for image to be uploaded before clicking submit.")
|
71 |
chat_history = " ".join(history_chat) # history as a str to be passed to model
|
72 |
+
chat_history = "you are a bodybuilding coach,and you sounds like arnold schwarzenegger, give advice on my gains, training and inspire me at the end"+chat_history + f"USER: <image>\n{text_input}\nASSISTANT:" # add text input for prompting
|
73 |
inference_result = infer(image, chat_history,
|
74 |
temperature,
|
75 |
length_penalty,
|