Spaces:
Sleeping
Sleeping
minor edits
Browse files
app.py
CHANGED
|
@@ -27,10 +27,8 @@ chat_with_tools = llm.bind_tools(tools)
|
|
| 27 |
class MyAgent(TypedDict):
|
| 28 |
messages: Annotated[list[AnyMessage], add_messages]
|
| 29 |
|
| 30 |
-
|
| 31 |
-
class BasicAgent:
|
| 32 |
def __init__(self):
|
| 33 |
-
print("
|
| 34 |
|
| 35 |
def __call__(self, question: str) -> str:
|
| 36 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
|
@@ -119,7 +117,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 119 |
|
| 120 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 121 |
try:
|
| 122 |
-
agent =
|
| 123 |
except Exception as e:
|
| 124 |
print(f"Error instantiating agent: {e}")
|
| 125 |
return f"Error initializing agent: {e}", None
|
|
@@ -225,7 +223,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 225 |
|
| 226 |
# --- Build Gradio Interface using Blocks ---
|
| 227 |
with gr.Blocks() as demo:
|
| 228 |
-
gr.Markdown("#
|
| 229 |
gr.Markdown(
|
| 230 |
"""
|
| 231 |
**Instructions:**
|
|
|
|
| 27 |
class MyAgent(TypedDict):
|
| 28 |
messages: Annotated[list[AnyMessage], add_messages]
|
| 29 |
|
|
|
|
|
|
|
| 30 |
def __init__(self):
|
| 31 |
+
print("MyAgent initialized.")
|
| 32 |
|
| 33 |
def __call__(self, question: str) -> str:
|
| 34 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
|
|
|
| 117 |
|
| 118 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 119 |
try:
|
| 120 |
+
agent = MyAgent()
|
| 121 |
except Exception as e:
|
| 122 |
print(f"Error instantiating agent: {e}")
|
| 123 |
return f"Error initializing agent: {e}", None
|
|
|
|
| 223 |
|
| 224 |
# --- Build Gradio Interface using Blocks ---
|
| 225 |
with gr.Blocks() as demo:
|
| 226 |
+
gr.Markdown("# MyAgent Evaluation Runner")
|
| 227 |
gr.Markdown(
|
| 228 |
"""
|
| 229 |
**Instructions:**
|