emre commited on
Commit
a9bddce
·
1 Parent(s): 9fde0f4

İlk ajan yüklemesi

Browse files
Files changed (2) hide show
  1. app.py +11 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from smolagents import CodeAgent, LiteLLMModel
3
+
4
+ model = LiteLLMModel(model_id="ollama/gemma3:12b", api_base="http://localhost:11434")
5
+ agent = CodeAgent(tools=[], model=model, add_base_tools=True)
6
+
7
+ def run_agent(prompt):
8
+ return agent.run(prompt)
9
+
10
+ iface = gr.Interface(fn=run_agent, inputs="text", outputs="text", title="Code Agent")
11
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gradio
2
+ smolagents