Spaces:
Runtime error
Runtime error
File size: 1,235 Bytes
e54728d d9f999d e54728d |
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 38 39 40 |
import gradio as gr
from model.model import model
# Making question examples
example1 = "Apa dashboard terkait KPI operational?"
example2 = "Apa link Dashboard Operational KPIs 2023?"
example3 = "Mau lihat data performance cabang, ada di dashboard apa?"
example4 = "Apa saja data di Dashboard Transactions?"
# Making UI
with gr.Blocks() as demo:
gr.Markdown(
"""
# Chatbot Dashboard
This project is a chatbot based on LLM using the RAG method.
This chatbot will answer questions related to the company's dashboard.
You can ask questions according to the dashboard data below.
""")
gr.Interface(fn=model,
inputs="text",
outputs="text",
theme=gr.themes.Monochrome(),
examples = [example1, example2, example3, example4])
gr.Markdown(
"""
## Data dashboard
""")
gr.HTML("<img src='https://huggingface.co/spaces/Aldo07/chatbot_dashboard/resolve/main/data%20dashboard.png' width='850'>")
gr.Markdown(
"""
### Reference
> Embedding : firqaaa/indo-sentence-bert-base [LINK](https://huggingface.co/firqaaa/indo-sentence-bert-base)
> Model QnA: muchad/idt5-qa-qg [LINK](https://huggingface.co/muchad/idt5-qa-qg)
""")
demo.launch()
|