Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,6 @@ from optillm.cot_reflection import cot_reflection
|
|
| 7 |
from optillm.rto import round_trip_optimization
|
| 8 |
from optillm.z3_solver import Z3SymPySolverSystem
|
| 9 |
from optillm.self_consistency import advanced_self_consistency_approach
|
| 10 |
-
from optillm.rstar import RStar
|
| 11 |
from optillm.plansearch import plansearch
|
| 12 |
from optillm.leap import leap
|
| 13 |
from optillm.reread import re2_approach
|
|
@@ -66,9 +65,6 @@ def respond(message, history, model, approach, system_message, max_tokens, tempe
|
|
| 66 |
final_response, _ = z3_solver.process_query(initial_query)
|
| 67 |
elif approach == "self_consistency":
|
| 68 |
final_response, _ = advanced_self_consistency_approach(system_prompt, initial_query, client, model)
|
| 69 |
-
elif approach == "rstar":
|
| 70 |
-
rstar = RStar(system_prompt, client, model)
|
| 71 |
-
final_response, _ = rstar.solve(initial_query)
|
| 72 |
elif approach == "cot_reflection":
|
| 73 |
final_response, _ = cot_reflection(system_prompt, initial_query, client, model)
|
| 74 |
elif approach == 'plansearch':
|
|
@@ -107,7 +103,7 @@ def create_model_dropdown():
|
|
| 107 |
|
| 108 |
def create_approach_dropdown():
|
| 109 |
return gr.Dropdown(
|
| 110 |
-
["none", "leap", "plansearch", "
|
| 111 |
value="none", label="Approach"
|
| 112 |
)
|
| 113 |
|
|
|
|
| 7 |
from optillm.rto import round_trip_optimization
|
| 8 |
from optillm.z3_solver import Z3SymPySolverSystem
|
| 9 |
from optillm.self_consistency import advanced_self_consistency_approach
|
|
|
|
| 10 |
from optillm.plansearch import plansearch
|
| 11 |
from optillm.leap import leap
|
| 12 |
from optillm.reread import re2_approach
|
|
|
|
| 65 |
final_response, _ = z3_solver.process_query(initial_query)
|
| 66 |
elif approach == "self_consistency":
|
| 67 |
final_response, _ = advanced_self_consistency_approach(system_prompt, initial_query, client, model)
|
|
|
|
|
|
|
|
|
|
| 68 |
elif approach == "cot_reflection":
|
| 69 |
final_response, _ = cot_reflection(system_prompt, initial_query, client, model)
|
| 70 |
elif approach == 'plansearch':
|
|
|
|
| 103 |
|
| 104 |
def create_approach_dropdown():
|
| 105 |
return gr.Dropdown(
|
| 106 |
+
["none", "leap", "plansearch", "cot_reflection", "rto", "self_consistency", "z3", "re2"],
|
| 107 |
value="none", label="Approach"
|
| 108 |
)
|
| 109 |
|