brunhild217 commited on
Commit
da53998
·
1 Parent(s): e90ba07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
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
- # The instructor will also provide a secret prompt to initialize the chat bot
48
- text_input = gr.TextArea(label='Copy and paste your text below', value=os.environ.get("SECRET_PROMPT"), lines=2)
49
- file_input = ""
50
- instructor_input = ""
51
- api_input = os.environ.get("OPENAI_API_KEY")
52
- learning_objectives = ""
 
 
 
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) \