Spaces:
Runtime error
Runtime error
add package resource mapping
Browse files- .gitignore +2 -0
- app.py +3 -2
.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
.DS_Store
|
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import gradio as gr
|
|
| 7 |
|
| 8 |
from swiftsage.agents import SwiftSage
|
| 9 |
from swiftsage.utils.commons import PromptTemplate, api_configs, setup_logging
|
| 10 |
-
|
| 11 |
|
| 12 |
def solve_problem(problem, max_iterations, reward_threshold, swift_model_id, sage_model_id, feedback_model_id, use_retrieval, start_with_sage):
|
| 13 |
# Configuration for each LLM
|
|
@@ -30,7 +30,8 @@ def solve_problem(problem, max_iterations, reward_threshold, swift_model_id, sag
|
|
| 30 |
}
|
| 31 |
|
| 32 |
# specify the path to the prompt templates
|
| 33 |
-
prompt_template_dir = './swiftsage/prompt_templates'
|
|
|
|
| 34 |
dataset = []
|
| 35 |
embeddings = [] # TODO: for retrieval augmentation (not implemented yet now)
|
| 36 |
s2 = SwiftSage(
|
|
|
|
| 7 |
|
| 8 |
from swiftsage.agents import SwiftSage
|
| 9 |
from swiftsage.utils.commons import PromptTemplate, api_configs, setup_logging
|
| 10 |
+
from pkg_resources import resource_filename
|
| 11 |
|
| 12 |
def solve_problem(problem, max_iterations, reward_threshold, swift_model_id, sage_model_id, feedback_model_id, use_retrieval, start_with_sage):
|
| 13 |
# Configuration for each LLM
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
# specify the path to the prompt templates
|
| 33 |
+
# prompt_template_dir = './swiftsage/prompt_templates'
|
| 34 |
+
prompt_template_dir = resource_filename('swiftsage', 'prompt_templates')
|
| 35 |
dataset = []
|
| 36 |
embeddings = [] # TODO: for retrieval augmentation (not implemented yet now)
|
| 37 |
s2 = SwiftSage(
|