Spaces:
Running
Running
File size: 807 Bytes
d8ed01f aa32697 d8ed01f aa32697 d8ed01f aa32697 d8ed01f |
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 33 34 35 36 37 |
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()
|