File size: 441 Bytes
f1d6020 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
# from langchain.vectorstores import Chroma
import chromadb
client = chromadb.PersistentClient(path="chroma.db")
db = client.get_collection(name="banks")
def greet(name):
global db
docs = db.query(query_texts=name, n_results=5)
return docs
iface = gr.Interface(fn=greet, inputs="text", outputs="text", title="Leads Generation", description="service, sales, point of failure, product, trend")
iface.launch() |