Spaces:
Build error
Build error
Commit
·
da53998
1
Parent(s):
e90ba07
Update app.py
Browse files
app.py
CHANGED
@@ -44,13 +44,17 @@ with gr.Blocks() as demo:
|
|
44 |
|
45 |
# Instead of ask students to provide key, the key is now directly provided by the instructor
|
46 |
embed_key(os.environ.get("OPENAI_API_KEY"), study_tutor)
|
47 |
-
#
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
53 |
|
|
|
54 |
with gr.Row():
|
55 |
vs_build_button = gr.Button(value = 'Start Studying with Your Tutor!', scale=1)
|
56 |
vs_build_button.click(disable_until_done, vs_build_button, vs_build_button) \
|
|
|
44 |
|
45 |
# Instead of ask students to provide key, the key is now directly provided by the instructor
|
46 |
embed_key(os.environ.get("OPENAI_API_KEY"), study_tutor)
|
47 |
+
# Reference document functionality (building vector stores)
|
48 |
+
with gr.Box():
|
49 |
+
gr.Markdown("### Add Reference Documents")
|
50 |
+
# TODO Add entry for path to vector store (should be disabled for now)
|
51 |
+
with gr.Row(equal_height=True):
|
52 |
+
text_input = gr.TextArea(label='Copy and paste your text below', lines=2)
|
53 |
+
file_input = gr.Files(label="Load a .txt or .pdf file", file_types=['.pdf', '.txt'], type="file", elem_classes="short-height")
|
54 |
+
instructor_input = gr.TextArea(label='Enter vector store URL, if given by instructor (WIP)', value='', lines=2, interactive=False, elem_classes="translucent")
|
55 |
+
learning_objectives = gr.Textbox(label='If provided by your instructor, please input your learning objectives for this session', value='')
|
56 |
|
57 |
+
# Adding the button to submit all of the settings and create the Chat Tutor Chain.
|
58 |
with gr.Row():
|
59 |
vs_build_button = gr.Button(value = 'Start Studying with Your Tutor!', scale=1)
|
60 |
vs_build_button.click(disable_until_done, vs_build_button, vs_build_button) \
|