my-code-agent / app.py
emre
İlk ajan yüklemesi
a9bddce
raw
history blame
370 Bytes
import gradio as gr
from smolagents import CodeAgent, LiteLLMModel
model = LiteLLMModel(model_id="ollama/gemma3:12b", api_base="http://localhost:11434")
agent = CodeAgent(tools=[], model=model, add_base_tools=True)
def run_agent(prompt):
return agent.run(prompt)
iface = gr.Interface(fn=run_agent, inputs="text", outputs="text", title="Code Agent")
iface.launch()