Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import pickle
|
|
6 |
from query_data import get_chain
|
7 |
from threading import Lock
|
8 |
|
9 |
-
with open("
|
10 |
vectorstore = pickle.load(f)
|
11 |
|
12 |
|
@@ -53,7 +53,7 @@ block = gr.Blocks(css=".gradio-container {background-color: lightgray}")
|
|
53 |
|
54 |
with block:
|
55 |
with gr.Row():
|
56 |
-
gr.Markdown("<h3><center>Chat-Your-H2
|
57 |
|
58 |
openai_api_key_textbox = gr.Textbox(
|
59 |
placeholder="Paste your OpenAI API key (sk-...)",
|
@@ -67,22 +67,21 @@ with block:
|
|
67 |
with gr.Row():
|
68 |
message = gr.Textbox(
|
69 |
label="What's your question?",
|
70 |
-
placeholder="Ask questions about anything covered in the H2
|
71 |
lines=1,
|
72 |
)
|
73 |
submit = gr.Button(value="Send", variant="secondary").style(full_width=False)
|
74 |
|
75 |
gr.Examples(
|
76 |
examples=[
|
77 |
-
"
|
78 |
-
"
|
79 |
-
"Explain the
|
80 |
-
"To what extent were the problems of the crisis decades caused by the actions of the US?"
|
81 |
],
|
82 |
inputs=message,
|
83 |
)
|
84 |
|
85 |
-
gr.HTML("Demo application of a LangChain chain, built on H2
|
86 |
|
87 |
gr.HTML(
|
88 |
"<center>Powered by <a href='https://github.com/hwchase17/langchain'>LangChain 🦜️🔗</a></center>"
|
|
|
6 |
from query_data import get_chain
|
7 |
from threading import Lock
|
8 |
|
9 |
+
with open("biovectorstore.pkl", "rb") as f:
|
10 |
vectorstore = pickle.load(f)
|
11 |
|
12 |
|
|
|
53 |
|
54 |
with block:
|
55 |
with gr.Row():
|
56 |
+
gr.Markdown("<h3><center>Chat-Your-H2 Bio</center></h3>")
|
57 |
|
58 |
openai_api_key_textbox = gr.Textbox(
|
59 |
placeholder="Paste your OpenAI API key (sk-...)",
|
|
|
67 |
with gr.Row():
|
68 |
message = gr.Textbox(
|
69 |
label="What's your question?",
|
70 |
+
placeholder="Ask questions about anything covered in the H2 Biology syllabus",
|
71 |
lines=1,
|
72 |
)
|
73 |
submit = gr.Button(value="Send", variant="secondary").style(full_width=False)
|
74 |
|
75 |
gr.Examples(
|
76 |
examples=[
|
77 |
+
"Describe the various levels of organisation in the structure of the G-protein linked receptor.",
|
78 |
+
"Explain the importance of the cell surface membrane in a macrophage during phagocytosis.",
|
79 |
+
"Explain why oxygen is needed for the production of ATP on the cirstae of the mitochondrion.",
|
|
|
80 |
],
|
81 |
inputs=message,
|
82 |
)
|
83 |
|
84 |
+
gr.HTML("Demo application of a LangChain chain, built on H2 Biology Data.")
|
85 |
|
86 |
gr.HTML(
|
87 |
"<center>Powered by <a href='https://github.com/hwchase17/langchain'>LangChain 🦜️🔗</a></center>"
|