File size: 643 Bytes
e943939 3434154 7585692 e943939 3434154 dfda327 e943939 e10e06d e943939 e10e06d e943939 da8e742 e943939 bf92a82 e943939 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import gradio as gr
from tools import convert_currency
from tools_agent import Agent
agent = Agent([convert_currency])
def respond(
message,
history: list[tuple[str, str]],
system_message,
):
# message = "I am traveling to Japan from Serbia, I have 1500 of local currency, how much of Japaese currency will I be able to get?"
plan = agent.execute(message)
return plan
"""
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
"""
demo = gr.ChatInterface(
respond,
additional_inputs=[],
)
if __name__ == "__main__":
demo.launch()
|