bentobytes commited on
Commit
c560874
·
1 Parent(s): 04e36cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -12,12 +12,7 @@ with gr.Blocks() as demo:
12
  with gr.Row():
13
  collection_name = gr.components.Textbox(
14
  label='Document name')
15
- # pinecone_environment = gr.components.Textbox(
16
- # label='Pinecone environment')
17
- # pinecone_index_name = gr.components.Textbox(
18
- # label='Pinecone index name')
19
- # openai_api_key = gr.components.Textbox(
20
- # label='Openai API key', type='password')
21
  with gr.Row():
22
  with gr.Column():
23
  file = gr.components.File(
@@ -35,9 +30,17 @@ with gr.Blocks() as demo:
35
 
36
  upload.click(create_indexes, [
37
  file,collection_name], [label])
38
- # index_clear_btn.click(clear_indexes, [
39
- # pinecone_api_key, pinecone_environment, pinecone_index_name], [label, file])
40
- msg.submit(create_conversation, [msg, chatbot, collection_name], [msg, chatbot])
 
 
 
 
 
 
 
 
41
  demo.launch()
42
 
43
  # # Retrieve the serialized list of username and password pairs from environment variable
 
12
  with gr.Row():
13
  collection_name = gr.components.Textbox(
14
  label='Document name')
15
+
 
 
 
 
 
16
  with gr.Row():
17
  with gr.Column():
18
  file = gr.components.File(
 
30
 
31
  upload.click(create_indexes, [
32
  file,collection_name], [label])
33
+
34
+ with gr.Row():
35
+ # ... Other components ...
36
+ source_document_textbox = gr.components.Textbox(
37
+ label='Source Document',
38
+ type='text',
39
+ default='',
40
+ lines=10, # Set the number of lines to display multiple documents
41
+ )
42
+ submit_button.click(create_conversation, [msg, chatbot, collection_name], [msg, chatbot])
43
+ msg.submit(create_conversation, [msg, chatbot, collection_name], [msg, chatbot, source_document_textbox])
44
  demo.launch()
45
 
46
  # # Retrieve the serialized list of username and password pairs from environment variable