Spaces:
Running
Running
Decreased iteration
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ model_prompt = "Solve the following mathematical problem: "
|
|
10 |
tokenizer = AutoTokenizer.from_pretrained("AI-MO/NuminaMath-7B-TIR")
|
11 |
model_path = snapshot_download(repo_id="Makima57/deepseek-math-Numina")
|
12 |
generator = ctranslate2.Generator(model_path, device="cpu", compute_type="int8")
|
|
|
13 |
|
14 |
# Function to generate predictions using the model
|
15 |
def get_prediction(question):
|
@@ -35,7 +36,7 @@ def majority_vote(question, num_iterations=10):
|
|
35 |
|
36 |
# Gradio interface for user input and output
|
37 |
def gradio_interface(question, correct_answer):
|
38 |
-
final_prediction, all_predictions,final_answer = majority_vote(question,
|
39 |
return {
|
40 |
"Question": question,
|
41 |
"Generated Answers (10 iterations)": all_predictions,
|
|
|
10 |
tokenizer = AutoTokenizer.from_pretrained("AI-MO/NuminaMath-7B-TIR")
|
11 |
model_path = snapshot_download(repo_id="Makima57/deepseek-math-Numina")
|
12 |
generator = ctranslate2.Generator(model_path, device="cpu", compute_type="int8")
|
13 |
+
iterations=10
|
14 |
|
15 |
# Function to generate predictions using the model
|
16 |
def get_prediction(question):
|
|
|
36 |
|
37 |
# Gradio interface for user input and output
|
38 |
def gradio_interface(question, correct_answer):
|
39 |
+
final_prediction, all_predictions,final_answer = majority_vote(question, iterations)
|
40 |
return {
|
41 |
"Question": question,
|
42 |
"Generated Answers (10 iterations)": all_predictions,
|