Spaces:
Runtime error
Runtime error
Vincent Claes
commited on
Commit
·
ee30e14
1
Parent(s):
373316d
add webchat interafce
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def load_data():
|
|
28 |
|
29 |
svm_retriever, vectorstore = load_data()
|
30 |
|
31 |
-
def process_question(question, svm_retriever=svm_retriever, vectorstore=vectorstore):
|
32 |
|
33 |
docs_svm=svm_retriever.get_relevant_documents(question)
|
34 |
print(len(docs_svm))
|
@@ -58,10 +58,12 @@ def process_question(question, svm_retriever=svm_retriever, vectorstore=vectorst
|
|
58 |
return output
|
59 |
|
60 |
|
61 |
-
iface = gr.
|
|
|
|
|
62 |
fn=process_question, # the function to wrap
|
63 |
-
inputs="text", # the input type
|
64 |
-
outputs="text", # the output type
|
65 |
examples=[
|
66 |
[f"what is the process of raising an incident?"],
|
67 |
[f"What is Cx0 program management?"],
|
|
|
28 |
|
29 |
svm_retriever, vectorstore = load_data()
|
30 |
|
31 |
+
def process_question(question, history, svm_retriever=svm_retriever, vectorstore=vectorstore):
|
32 |
|
33 |
docs_svm=svm_retriever.get_relevant_documents(question)
|
34 |
print(len(docs_svm))
|
|
|
58 |
return output
|
59 |
|
60 |
|
61 |
+
iface = gr.ChatInterface(
|
62 |
+
title="Internal DOC QA",
|
63 |
+
theme=gr.themes.Soft,
|
64 |
fn=process_question, # the function to wrap
|
65 |
+
# inputs="text", # the input type
|
66 |
+
# outputs="text", # the output type
|
67 |
examples=[
|
68 |
[f"what is the process of raising an incident?"],
|
69 |
[f"What is Cx0 program management?"],
|