Spaces:
Runtime error
Runtime error
Asif Islam
commited on
Commit
•
e9d21d7
1
Parent(s):
51abbbc
Fixed spelling error
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ vectorstore = Chroma.from_documents(documents=all_splits, embedding=OpenAIEmbedd
|
|
32 |
prompt = ChatPromptTemplate(
|
33 |
messages=[
|
34 |
SystemMessagePromptTemplate.from_template(
|
35 |
-
"You are a nice chatbot having a conversation with a human about UF student government and its 800 codes which are about the budget and student org funding. Please reference context first when trying to respond to queries and try to
|
36 |
),
|
37 |
# The `variable_name` here is what must align with memory
|
38 |
MessagesPlaceholder(variable_name="chat_history"),
|
@@ -49,5 +49,7 @@ qa = ConversationalRetrievalChain.from_llm(llm, retriever=retriever, memory=memo
|
|
49 |
def queryAI(query: str):
|
50 |
return qa({"question": query})["answer"]
|
51 |
|
52 |
-
|
|
|
|
|
53 |
gui.launch()
|
|
|
32 |
prompt = ChatPromptTemplate(
|
33 |
messages=[
|
34 |
SystemMessagePromptTemplate.from_template(
|
35 |
+
"You are a nice chatbot having a conversation with a human about UF student government and its 800 codes which are about the budget and student org funding. Please reference context first when trying to respond to queries and try to cite sources."
|
36 |
),
|
37 |
# The `variable_name` here is what must align with memory
|
38 |
MessagesPlaceholder(variable_name="chat_history"),
|
|
|
49 |
def queryAI(query: str):
|
50 |
return qa({"question": query})["answer"]
|
51 |
|
52 |
+
website_description = "This is an experimental bot to help students get help with the 800 codes which govern the student activity fees and service budget and student org funding. This is intended to be a helpful resource but its accuracy has not been verfied yet!"
|
53 |
+
|
54 |
+
gui = gr.Interface(fn=queryAI, inputs="text", outputs="text", title="800 Codes Bot - EXPERIMENTAL", description=website_description, flagging_options=["Flag Correct/Helpful", "Flag Incorrect"])
|
55 |
gui.launch()
|