Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,11 +22,11 @@ def generate_embeddings(texts, model_id, hf_token):
|
|
22 |
embeddings = response.json()
|
23 |
return embeddings
|
24 |
AP_bio = load_dataset('vjain/biology_AP_embeddings')
|
25 |
-
df1 = pd.DataFrame(
|
26 |
df1["similarity"] = 0
|
27 |
|
28 |
AP_physics = load_dataset('vjain/AP_physics_embeddings')
|
29 |
-
df2 = pd.DataFrame(
|
30 |
df2["similarity"] = 0
|
31 |
|
32 |
dataframes = {
|
@@ -72,7 +72,7 @@ input_text = gr.inputs.Textbox(label="Enter your questions here", placeholder="E
|
|
72 |
text_output = gr.outputs.Textbox(label="Answer")
|
73 |
csv_dropdown = gr.inputs.Dropdown(
|
74 |
label="Select the Book",
|
75 |
-
choices=["
|
76 |
)
|
77 |
description = "Scholar Bot is a question answering system designed to provide accurate and relevant answers to questions from this book hosted by OpenStax https://openstax.org/details/books/biology-ap-courses. Simply enter your question in the text box above and Scholar Bot will use advanced natural language processing algorithms to search a large corpus of biology text to find the best answer for you. Scholar Bot uses the Sentence Transformers model to generate embeddings of text, and OpenAI's GPT-3 language model to provide answers to your questions."
|
78 |
|
|
|
22 |
embeddings = response.json()
|
23 |
return embeddings
|
24 |
AP_bio = load_dataset('vjain/biology_AP_embeddings')
|
25 |
+
df1 = pd.DataFrame(AP_bio['train'])
|
26 |
df1["similarity"] = 0
|
27 |
|
28 |
AP_physics = load_dataset('vjain/AP_physics_embeddings')
|
29 |
+
df2 = pd.DataFrame(AP_Physics['train'])
|
30 |
df2["similarity"] = 0
|
31 |
|
32 |
dataframes = {
|
|
|
72 |
text_output = gr.outputs.Textbox(label="Answer")
|
73 |
csv_dropdown = gr.inputs.Dropdown(
|
74 |
label="Select the Book",
|
75 |
+
choices=["AP_Bio", "AP_Physics"]
|
76 |
)
|
77 |
description = "Scholar Bot is a question answering system designed to provide accurate and relevant answers to questions from this book hosted by OpenStax https://openstax.org/details/books/biology-ap-courses. Simply enter your question in the text box above and Scholar Bot will use advanced natural language processing algorithms to search a large corpus of biology text to find the best answer for you. Scholar Bot uses the Sentence Transformers model to generate embeddings of text, and OpenAI's GPT-3 language model to provide answers to your questions."
|
78 |
|