cmpatino's picture
Update app with agent call
aa32697
raw
history blame
807 Bytes
import gradio as gr
from dotenv import load_dotenv
from cv_assistant.agent import Agent
load_dotenv()
agent = Agent(
faiss_index_path="./content_assets/docs.index",
faise_store_path="./content_assets/faiss_store.pkl",
)
def answer(query):
return agent.answer(query=query)
description = """
### Ask about my experience, skills, and education!
I built this using [Gradio](https://gradio.app) and [LangChain](https://langchain.readthedocs.io/en/latest/).
"""
title = "Career Chatbot"
iface = gr.Interface(
fn=answer,
inputs=gr.Textbox(
value="What's his experience in recommender systems?", label="Question"
),
outputs=gr.Textbox(label="Answer"),
description=description,
title=title,
analytics_enabled=True,
allow_flagging="auto",
)
iface.launch()