Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ class LengthAgent:
|
|
31 |
print(f"LengthAgent received: {question[:50]}...")
|
32 |
return f"Length of input: {len(question)}"
|
33 |
|
34 |
-
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
35 |
"""
|
36 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
37 |
and displays the results.
|
@@ -176,9 +176,9 @@ with gr.Blocks() as demo:
|
|
176 |
results_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)
|
177 |
|
178 |
run_button.click(
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
)
|
183 |
|
184 |
if __name__ == "__main__":
|
|
|
31 |
print(f"LengthAgent received: {question[:50]}...")
|
32 |
return f"Length of input: {len(question)}"
|
33 |
|
34 |
+
def run_and_submit_all(agent_name: str, profile: gr.OAuthProfile | None = None):
|
35 |
"""
|
36 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
37 |
and displays the results.
|
|
|
176 |
results_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)
|
177 |
|
178 |
run_button.click(
|
179 |
+
fn=run_and_submit_all,
|
180 |
+
inputs=[agent_dropdown],
|
181 |
+
outputs=[status_output, results_table]
|
182 |
)
|
183 |
|
184 |
if __name__ == "__main__":
|