File size: 663 Bytes
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
import gradio as gr
from dotenv import load_dotenv

load_dotenv()


def answer(query):
    return f"Here's the answer to your question: {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()