jassi004 commited on
Commit
a81cb3e
·
verified ·
1 Parent(s): 1d76826

Upload 2 files

Browse files
Files changed (2) hide show
  1. main.py +22 -0
  2. requirements.txt +1 -1
main.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from agent import run_agent
3
+
4
+ examples = [
5
+ "What's the capital of France?",
6
+ "Solve: 345 * 12",
7
+ "Write a Python function to reverse a list.",
8
+ "What's the square root of 169?",
9
+ "Who discovered penicillin?"
10
+ ]
11
+
12
+ def ask_agent(input_text):
13
+ return run_agent(input_text)
14
+
15
+ iface = gr.Interface(fn=ask_agent,
16
+ inputs="text",
17
+ outputs="text",
18
+ title="Final Assignment Agent",
19
+ description="Enter your question and the agent will answer it.",
20
+ examples=examples)
21
+
22
+ iface.launch()
requirements.txt CHANGED
@@ -1,2 +1,2 @@
 
1
  gradio
2
- requests
 
1
+ smol-agent
2
  gradio