Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
7f6874b
1
Parent(s):
4947b8a
fix
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from gradio import ChatMessage
|
|
6 |
from smolagents.gradio_ui import stream_to_gradio
|
7 |
|
8 |
from agents.all_agents import get_master_agent
|
9 |
-
from llm import
|
10 |
|
11 |
|
12 |
gr.set_static_paths(paths=["images/"])
|
@@ -23,8 +23,9 @@ def resize_image(image):
|
|
23 |
return image
|
24 |
|
25 |
|
26 |
-
def chat_interface_fn(input_request, history: List[ChatMessage], gallery):
|
27 |
-
|
|
|
28 |
if gallery is None:
|
29 |
gallery = []
|
30 |
else:
|
|
|
6 |
from smolagents.gradio_ui import stream_to_gradio
|
7 |
|
8 |
from agents.all_agents import get_master_agent
|
9 |
+
from llm import get_anthropic_model
|
10 |
|
11 |
|
12 |
gr.set_static_paths(paths=["images/"])
|
|
|
23 |
return image
|
24 |
|
25 |
|
26 |
+
def chat_interface_fn(input_request, history: List[ChatMessage], gallery, anthropic_api_key, anthropic_model_id):
|
27 |
+
model = get_anthropic_model(anthropic_model_id, anthropic_api_key)
|
28 |
+
agent = get_master_agent(model)
|
29 |
if gallery is None:
|
30 |
gallery = []
|
31 |
else:
|