Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,20 +15,6 @@ from dotenv import load_dotenv
|
|
| 15 |
|
| 16 |
load_dotenv()
|
| 17 |
API_KEY = os.getenv("OPENAI_API_KEY")
|
| 18 |
-
LANGFUSE_SK = os.getenv("LANGFUSE_SECRET_KEY")
|
| 19 |
-
LANGFUSE_PK = os.getenv("LANGFUSE_PUBLIC_KEY")
|
| 20 |
-
HOST = os.getenv("LANGFUSE_HOST")
|
| 21 |
-
|
| 22 |
-
# langfuse_handler = CallbackHandler(
|
| 23 |
-
# secret_key=LANGFUSE_SK,
|
| 24 |
-
# public_key=LANGFUSE_PK,
|
| 25 |
-
# host=HOST,
|
| 26 |
-
# debug=True,
|
| 27 |
-
# session_id="1505",
|
| 28 |
-
# release="1.0.0",
|
| 29 |
-
# user_id="Krish",
|
| 30 |
-
# trace_name="WarehouseAst"
|
| 31 |
-
# )
|
| 32 |
|
| 33 |
# Function to create the chat chain
|
| 34 |
def create_chat_chain(file_path, openai_model):
|
|
@@ -81,8 +67,6 @@ if __name__ == "__main__":
|
|
| 81 |
openai_model = "gpt-3.5-turbo"
|
| 82 |
file_path = [
|
| 83 |
r"sat-practest.pdf"
|
| 84 |
-
#r"Advantage Dashboard Functional Description.pdf",
|
| 85 |
-
#r"user_guide.pdf"
|
| 86 |
]
|
| 87 |
chain = create_chat_chain(file_path, openai_model)
|
| 88 |
|
|
@@ -97,7 +81,12 @@ if __name__ == "__main__":
|
|
| 97 |
Feel free to experiment with your own different queries and usage or accesibility requests!
|
| 98 |
""")
|
| 99 |
with gr.Column(scale=3):
|
| 100 |
-
ex = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
chatbot = gr.Chatbot()
|
| 102 |
msg = gr.Textbox()
|
| 103 |
gr.Examples(ex, msg)
|
|
|
|
| 15 |
|
| 16 |
load_dotenv()
|
| 17 |
API_KEY = os.getenv("OPENAI_API_KEY")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# Function to create the chat chain
|
| 20 |
def create_chat_chain(file_path, openai_model):
|
|
|
|
| 67 |
openai_model = "gpt-3.5-turbo"
|
| 68 |
file_path = [
|
| 69 |
r"sat-practest.pdf"
|
|
|
|
|
|
|
| 70 |
]
|
| 71 |
chain = create_chat_chain(file_path, openai_model)
|
| 72 |
|
|
|
|
| 81 |
Feel free to experiment with your own different queries and usage or accesibility requests!
|
| 82 |
""")
|
| 83 |
with gr.Column(scale=3):
|
| 84 |
+
ex = [
|
| 85 |
+
"Which question contains information about Navajo Nation legislator Annie Dodge Wauneka?",
|
| 86 |
+
"What does question 7 in module 2 of reading and writing ask for?",
|
| 87 |
+
"How many questions are there in module 2 of the reading and writing section?",
|
| 88 |
+
"Which question of which section talks about the poem "To You" by Walt Whitman?"
|
| 89 |
+
]
|
| 90 |
chatbot = gr.Chatbot()
|
| 91 |
msg = gr.Textbox()
|
| 92 |
gr.Examples(ex, msg)
|