Makima57 commited on
Commit
291e22e
·
verified ·
1 Parent(s): f5c3a62

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -1,14 +1,13 @@
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("AI-MO/NuminaMath-7B-TIR")
11
- model_path = model_id
12
  generator = ctranslate2.Generator(model_path, device="cpu", compute_type="int8")
13
 
14
  # Function to generate predictions using the model
 
1
 
2
  import gradio as gr
3
  import ctranslate2
4
+ from transformers import AutoTokenizer
5
+ from huggingface_hub import snapshot_download
6
 
7
+ # Define the model and tokenizer loading
8
+ model_prompt = "Solve the following mathematical problem: "
 
 
9
  tokenizer = AutoTokenizer.from_pretrained("AI-MO/NuminaMath-7B-TIR")
10
+ model_path = snapshot_download(repo_id="Makima57/deepseek-math-Numina")
11
  generator = ctranslate2.Generator(model_path, device="cpu", compute_type="int8")
12
 
13
  # Function to generate predictions using the model