Makima57 commited on
Commit
b3bc249
1 Parent(s): 5104c61

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,12 +1,13 @@
1
 
2
  import gradio as gr
3
  import ctranslate2
4
- from transformers import AutoTokenizer
5
 
6
- # Define the model and tokenizer loading
7
- model_prompt = "Solve the following mathematical problem: "
8
- tokenizer = AutoTokenizer.from_pretrained("AI-MO/NuminaMath-7B-TIR")
9
- model_path = "/kaggle/working/deepseek-math-Numina"
 
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