Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,20 @@ from swiftsage.utils.commons import PromptTemplate, api_configs, setup_logging
|
|
10 |
from pkg_resources import resource_filename
|
11 |
|
12 |
ENGINE = "Together"
|
13 |
-
# SWIFT_MODEL_ID = "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
|
14 |
SWIFT_MODEL_ID = "meta-llama/Meta-Llama-3-8B-Instruct-Reference"
|
15 |
FEEDBACK_MODEL_ID = "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo"
|
16 |
SAGE_MODEL_ID = "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo"
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
# ENGINE = "SambaNova"
|
19 |
# SWIFT_MODEL_ID = "Meta-Llama-3.1-8B-Instruct"
|
20 |
# FEEDBACK_MODEL_ID = "Meta-Llama-3.1-70B-Instruct"
|
@@ -85,7 +94,7 @@ def solve_problem(problem, max_iterations, reward_threshold, swift_model_id, sag
|
|
85 |
reasoning = reasoning.replace("The generated code is:", "\n---\nThe generated code is:").strip()
|
86 |
solution = solution.replace("Answer (from running the code):\n ", " ").strip()
|
87 |
# generate HTML for the log messages and display them with wrap and a scroll bar and a max height in the code block with log style
|
88 |
-
|
89 |
log_messages = "<pre style='white-space: pre-wrap; max-height: 500px; overflow-y: scroll;'><code class='log'>" + "\n".join(messages) + "</code></pre>"
|
90 |
return reasoning, solution, log_messages
|
91 |
|
|
|
10 |
from pkg_resources import resource_filename
|
11 |
|
12 |
ENGINE = "Together"
|
|
|
13 |
SWIFT_MODEL_ID = "meta-llama/Meta-Llama-3-8B-Instruct-Reference"
|
14 |
FEEDBACK_MODEL_ID = "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo"
|
15 |
SAGE_MODEL_ID = "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo"
|
16 |
|
17 |
+
ENGINE = "Together"
|
18 |
+
SWIFT_MODEL_ID = "meta-llama/Meta-Llama-3-8B-Instruct-Turbo"
|
19 |
+
FEEDBACK_MODEL_ID = "meta-llama/Meta-Llama-3-8B-Instruct-Reference"
|
20 |
+
SAGE_MODEL_ID = "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo"
|
21 |
+
|
22 |
+
# ENGINE = "Groq"
|
23 |
+
# SWIFT_MODEL_ID = "llama-3.1-8b-instant"
|
24 |
+
# FEEDBACK_MODEL_ID = "llama-3.1-8b-instant"
|
25 |
+
# SAGE_MODEL_ID = "llama-3.1-70b-versatile"
|
26 |
+
|
27 |
# ENGINE = "SambaNova"
|
28 |
# SWIFT_MODEL_ID = "Meta-Llama-3.1-8B-Instruct"
|
29 |
# FEEDBACK_MODEL_ID = "Meta-Llama-3.1-70B-Instruct"
|
|
|
94 |
reasoning = reasoning.replace("The generated code is:", "\n---\nThe generated code is:").strip()
|
95 |
solution = solution.replace("Answer (from running the code):\n ", " ").strip()
|
96 |
# generate HTML for the log messages and display them with wrap and a scroll bar and a max height in the code block with log style
|
97 |
+
|
98 |
log_messages = "<pre style='white-space: pre-wrap; max-height: 500px; overflow-y: scroll;'><code class='log'>" + "\n".join(messages) + "</code></pre>"
|
99 |
return reasoning, solution, log_messages
|
100 |
|