Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,14 +5,14 @@ import torch
|
|
5 |
from threading import Thread
|
6 |
import re
|
7 |
|
8 |
-
phi4_model_path = "
|
9 |
|
10 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
11 |
|
12 |
phi4_model = AutoModelForCausalLM.from_pretrained(phi4_model_path, device_map="auto", torch_dtype="auto")
|
13 |
phi4_tokenizer = AutoTokenizer.from_pretrained(phi4_model_path)
|
14 |
|
15 |
-
@spaces.GPU(duration=
|
16 |
def generate_response(user_message, max_tokens, temperature, top_k, top_p, repetition_penalty, history_state):
|
17 |
if not user_message.strip():
|
18 |
return history_state, history_state
|
|
|
5 |
from threading import Thread
|
6 |
import re
|
7 |
|
8 |
+
phi4_model_path = "Daemontatox/Qwen3-14B-Griffon"
|
9 |
|
10 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
11 |
|
12 |
phi4_model = AutoModelForCausalLM.from_pretrained(phi4_model_path, device_map="auto", torch_dtype="auto")
|
13 |
phi4_tokenizer = AutoTokenizer.from_pretrained(phi4_model_path)
|
14 |
|
15 |
+
@spaces.GPU(duration=60)
|
16 |
def generate_response(user_message, max_tokens, temperature, top_k, top_p, repetition_penalty, history_state):
|
17 |
if not user_message.strip():
|
18 |
return history_state, history_state
|