brunhild217 commited on
Commit
9c5d18e
·
1 Parent(s): b2cb3b4

Update app.py

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