Spaces:
Runtime error
Runtime error
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
|
2 |
import gradio as gr
|
3 |
import ctranslate2
|
4 |
-
from transformers import AutoTokenizer
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
10 |
generator = ctranslate2.Generator(model_path, device="cpu", compute_type="int8")
|
11 |
|
12 |
# Function to generate predictions using the model
|
|
|
1 |
|
2 |
import gradio as gr
|
3 |
import ctranslate2
|
4 |
+
from transformers import AutoModel, AutoTokenizer
|
5 |
|
6 |
+
|
7 |
+
# Load the model and tokenizer from Hugging Face
|
8 |
+
model_id = "Makima57/deepseek-math-Numina"
|
9 |
+
model = AutoModel.from_pretrained(model_id)
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
11 |
generator = ctranslate2.Generator(model_path, device="cpu", compute_type="int8")
|
12 |
|
13 |
# Function to generate predictions using the model
|