owner-manual / app.py
ctankso_americas_corpdir_net
minor re-formatting
0a0682f
raw
history blame
902 Bytes
from InnovationHub.llm.vector_store import *
from InnovationHub.llm.chain import *
"""
# Create the vector index
db_path = "./data/s-class-manual"
embeddings = HuggingfaceEmbeddings()
index = FAISS(docs=docs, folder_path=db_path, embeddings=embeddings)
"""
# Launch the Gradio UI
def start_gradio():
chatbot_interface = gradio.Interface(
fn=chatbot,
inputs=["text", gradio.inputs.Checkbox(label="Create bot"), gradio.inputs.Slider(
minimum=1, maximum=10, step=1, label="k")],
outputs="text",
title="Mercedes-Benz S-Class Owner's Manual",
description="Ask your vehicle's manual questions and get answers",
examples=[
["What are the different features of the dashboard console?", True, 2],
["What do they do?", False, 3]
]
)
chatbot_interface.launch()
if __name__ == '__main__':
start_ui()