Spaces:
Runtime error
Runtime error
Commit
·
d7024a0
1
Parent(s):
da554da
Update app.py
Browse files
app.py
CHANGED
@@ -10,9 +10,9 @@ openai_api_key=os.getenv('OPENAI_API_KEY')
|
|
10 |
theme = gr.themes.Base()
|
11 |
|
12 |
with gr.Blocks(theme=theme) as demo:
|
13 |
-
with gr.Row():
|
14 |
-
|
15 |
-
|
16 |
|
17 |
with gr.Row():
|
18 |
with gr.Column():
|
@@ -30,8 +30,7 @@ with gr.Blocks(theme=theme) as demo:
|
|
30 |
submit_button = gr.components.Button(value='Submit', variant='primary')
|
31 |
clear = gr.ClearButton([msg, chatbot])
|
32 |
|
33 |
-
upload.click(create_indexes, [
|
34 |
-
file,collection_name], [label])
|
35 |
|
36 |
with gr.Row():
|
37 |
# ... Other components ...
|
@@ -41,8 +40,8 @@ with gr.Blocks(theme=theme) as demo:
|
|
41 |
default='',
|
42 |
lines=10, # Set the number of lines to display multiple documents
|
43 |
)
|
44 |
-
submit_button.click(create_conversation, [msg, chatbot
|
45 |
-
msg.submit(create_conversation, [msg, chatbot
|
46 |
demo.launch()
|
47 |
|
48 |
# # Retrieve the serialized list of username and password pairs from environment variable
|
|
|
10 |
theme = gr.themes.Base()
|
11 |
|
12 |
with gr.Blocks(theme=theme) as demo:
|
13 |
+
# with gr.Row():
|
14 |
+
# collection_name = gr.components.Textbox(
|
15 |
+
# label='Document name')
|
16 |
|
17 |
with gr.Row():
|
18 |
with gr.Column():
|
|
|
30 |
submit_button = gr.components.Button(value='Submit', variant='primary')
|
31 |
clear = gr.ClearButton([msg, chatbot])
|
32 |
|
33 |
+
upload.click(create_indexes, [file], [label])
|
|
|
34 |
|
35 |
with gr.Row():
|
36 |
# ... Other components ...
|
|
|
40 |
default='',
|
41 |
lines=10, # Set the number of lines to display multiple documents
|
42 |
)
|
43 |
+
submit_button.click(create_conversation, [msg, chatbot], [msg, chatbot, source_document_textbox])
|
44 |
+
msg.submit(create_conversation, [msg, chatbot], [msg, chatbot, source_document_textbox])
|
45 |
demo.launch()
|
46 |
|
47 |
# # Retrieve the serialized list of username and password pairs from environment variable
|