File size: 593 Bytes
f3a0a0c afebf23 f3a0a0c afebf23 f3a0a0c afebf23 f3a0a0c afebf23 f3a0a0c afebf23 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
from llm.financial_chat import financial_chat
from llm.groq_client import get_groq_client
# Reuse Groq client
groq_client = get_groq_client()
def chat_with_user(user_input):
return financial_chat(user_input, groq_client=groq_client)
iface = gr.Interface(
fn=chat_with_user,
inputs=gr.Textbox(label="Ask your finance-related question here:"),
outputs=gr.Textbox(label="FinanceWise AI Response"),
title="AI Assistant for Finance",
description="This assistant only answers finance-related questions."
)
if __name__ == "__main__":
iface.launch() |