Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -321,8 +321,6 @@ def wrap_text(text, width=90):
|
|
321 |
|
322 |
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-1_8B-Chat", trust_remote_code=True) # TruEra
|
323 |
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-1_8B-Chat", device_map="auto", trust_remote_code=True).eval()
|
324 |
-
device = "cuda" if torch.cuda.is_available() else "cpu"
|
325 |
-
model.to(device)
|
326 |
|
327 |
def multimodal_prompt(user_input, system_prompt="You are an expert medical analyst:"): # TruEra
|
328 |
formatted_input = f"{user_input}{system_prompt}"
|
|
|
321 |
|
322 |
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-1_8B-Chat", trust_remote_code=True) # TruEra
|
323 |
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-1_8B-Chat", device_map="auto", trust_remote_code=True).eval()
|
|
|
|
|
324 |
|
325 |
def multimodal_prompt(user_input, system_prompt="You are an expert medical analyst:"): # TruEra
|
326 |
formatted_input = f"{user_input}{system_prompt}"
|