File size: 791 Bytes
f1d6020
 
 
 
 
 
 
 
 
 
 
 
daa55b3
f1d6020
daa55b3
f1d6020
 
 
daa55b3
 
 
 
 
 
 
 
 
 
 
 
f1d6020
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
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(issue):
  global db
  docs = db.query(query_texts=issue, n_results=5)
  return docs



iface = gr.Interface(fn=greet, inputs="text", outputs="text", title="Leads Generation", description="""Using Sentence Embedding to inject Public ML Banks Text Dataset @ https://github.com/kevinwkc/analytics/blob/master/ai/vectorDB.py""",
 article="""
 put in the issue regarding service, sales, point of failure, product, trend to find out what customer talking about
 
 some ideas
 ----------
 having bad client experience
 having credit card problem
 late payment fee
 credit score dropping
 """)
iface.launch()