Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,8 @@ import uuid
|
|
| 8 |
|
| 9 |
|
| 10 |
# Load model and tokenizer
|
| 11 |
-
our_model_path = "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
|
| 12 |
-
|
| 13 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 14 |
|
| 15 |
our_model = AutoModelForCausalLM.from_pretrained(our_model_path, trust_remote_code=True,device_map="auto", torch_dtype="auto")
|
|
@@ -26,7 +26,7 @@ conversations = {}
|
|
| 26 |
def generate_conversation_id():
|
| 27 |
return str(uuid.uuid4())[:8]
|
| 28 |
|
| 29 |
-
@spaces.GPU(duration=
|
| 30 |
def generate_response(user_message, max_tokens, temperature, top_p, history_state):
|
| 31 |
if not user_message.strip():
|
| 32 |
return history_state, history_state
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
# Load model and tokenizer
|
| 11 |
+
#our_model_path = "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
|
| 12 |
+
our_model_path = "FractalAIResearch/Fathom-R1-14B"
|
| 13 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 14 |
|
| 15 |
our_model = AutoModelForCausalLM.from_pretrained(our_model_path, trust_remote_code=True,device_map="auto", torch_dtype="auto")
|
|
|
|
| 26 |
def generate_conversation_id():
|
| 27 |
return str(uuid.uuid4())[:8]
|
| 28 |
|
| 29 |
+
@spaces.GPU(duration=600)
|
| 30 |
def generate_response(user_message, max_tokens, temperature, top_p, history_state):
|
| 31 |
if not user_message.strip():
|
| 32 |
return history_state, history_state
|