Spaces:
Running
Running
Update chatbot.py
Browse files- chatbot.py +3 -3
chatbot.py
CHANGED
@@ -26,9 +26,9 @@ from gradio_client import Client, file
|
|
26 |
from groq import Groq
|
27 |
|
28 |
# You can also use models that are commented below
|
29 |
-
|
30 |
# model_id = "llava-hf/llava-interleave-qwen-7b-hf"
|
31 |
-
model_id = "llava-hf/llava-interleave-qwen-7b-dpo-hf"
|
32 |
processor = LlavaProcessor.from_pretrained(model_id)
|
33 |
model = LlavaForConditionalGeneration.from_pretrained(model_id,torch_dtype=torch.float16) #, use_flash_attention_2=True)
|
34 |
model.to("cpu")
|
@@ -212,7 +212,7 @@ client_mixtral = InferenceClient("NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO")
|
|
212 |
client_llama = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
|
213 |
client_mistral_nemo = InferenceClient("mistralai/Mistral-Nemo-Instruct-2407")
|
214 |
|
215 |
-
@spaces.GPU(duration=60, queue=False)
|
216 |
def model_inference( user_prompt, chat_history):
|
217 |
if user_prompt["files"]:
|
218 |
inputs = llava(user_prompt, chat_history)
|
|
|
26 |
from groq import Groq
|
27 |
|
28 |
# You can also use models that are commented below
|
29 |
+
model_id = "llava-hf/llava-interleave-qwen-0.5b-hf"
|
30 |
# model_id = "llava-hf/llava-interleave-qwen-7b-hf"
|
31 |
+
# model_id = "llava-hf/llava-interleave-qwen-7b-dpo-hf"
|
32 |
processor = LlavaProcessor.from_pretrained(model_id)
|
33 |
model = LlavaForConditionalGeneration.from_pretrained(model_id,torch_dtype=torch.float16) #, use_flash_attention_2=True)
|
34 |
model.to("cpu")
|
|
|
212 |
client_llama = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
|
213 |
client_mistral_nemo = InferenceClient("mistralai/Mistral-Nemo-Instruct-2407")
|
214 |
|
215 |
+
# @spaces.GPU(duration=60, queue=False)
|
216 |
def model_inference( user_prompt, chat_history):
|
217 |
if user_prompt["files"]:
|
218 |
inputs = llava(user_prompt, chat_history)
|