Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,6 @@ import gradio as gr
|
|
3 |
|
4 |
from openai import OpenAI
|
5 |
|
6 |
-
from optillm.moa import mixture_of_agents
|
7 |
-
from optillm.mcts import chat_with_mcts
|
8 |
-
from optillm.bon import best_of_n_sampling
|
9 |
from optillm.cot_reflection import cot_reflection
|
10 |
|
11 |
API_KEY = os.environ.get("OPENROUTER_API_KEY")
|
@@ -34,7 +31,7 @@ def respond(
|
|
34 |
|
35 |
# response = ""
|
36 |
|
37 |
-
final_response =
|
38 |
return final_response
|
39 |
|
40 |
# for message in client.chat_completion(
|
@@ -61,7 +58,7 @@ demo = gr.ChatInterface(
|
|
61 |
value="nousresearch/hermes-3-llama-3.1-405b:free", label="Model", info="Choose the base model"
|
62 |
),
|
63 |
gr.Dropdown(
|
64 |
-
["
|
65 |
),
|
66 |
gr.Textbox(value="", label="System message"),
|
67 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
|
3 |
|
4 |
from openai import OpenAI
|
5 |
|
|
|
|
|
|
|
6 |
from optillm.cot_reflection import cot_reflection
|
7 |
|
8 |
API_KEY = os.environ.get("OPENROUTER_API_KEY")
|
|
|
31 |
|
32 |
# response = ""
|
33 |
|
34 |
+
final_response = cot_reflection(system_message, message, client, model)
|
35 |
return final_response
|
36 |
|
37 |
# for message in client.chat_completion(
|
|
|
58 |
value="nousresearch/hermes-3-llama-3.1-405b:free", label="Model", info="Choose the base model"
|
59 |
),
|
60 |
gr.Dropdown(
|
61 |
+
["leap", "plansearch", "rstar", "cot_reflection"], value="cot_reflection", label="Approach", info="Choose the approach"
|
62 |
),
|
63 |
gr.Textbox(value="", label="System message"),
|
64 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|