Spaces:
Sleeping
Sleeping
Update app_drive.py
Browse files- app_drive.py +3 -3
app_drive.py
CHANGED
@@ -13,7 +13,7 @@ from driveapi.drive_database import create_chroma_db
|
|
13 |
# global time_diff, model_name, search_type
|
14 |
time_diff = 0
|
15 |
model_name="gpt-3.5-turbo-1106" # FOR TESTING
|
16 |
-
# model_name = "gpt-4-1106-preview"
|
17 |
# model_name = "gpt-4-0125-preview"
|
18 |
search_type = "stuff"
|
19 |
input_question = ""
|
@@ -119,7 +119,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="emerald", neutral_hue="slate"))
|
|
119 |
with gr.Row(equal_height=True):
|
120 |
with gr.Column():
|
121 |
with gr.Row():
|
122 |
-
pdf_files_dnd = gr.
|
123 |
|
124 |
|
125 |
with gr.Column():
|
@@ -133,7 +133,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="emerald", neutral_hue="slate"))
|
|
133 |
|
134 |
|
135 |
drive_link_input.submit(fn=create_data_from_drive, inputs=[drive_link_input], outputs=[status_message])
|
136 |
-
pdf_files_dnd.change(fn=check_pdfs, inputs=[pdf_files_dnd], outputs=[status_message])
|
137 |
|
138 |
chatbot = gr.Chatbot(height=750)
|
139 |
msg = gr.Textbox(label="Send a message", placeholder="Send a message",
|
|
|
13 |
# global time_diff, model_name, search_type
|
14 |
time_diff = 0
|
15 |
model_name="gpt-3.5-turbo-1106" # FOR TESTING
|
16 |
+
# model_name = "gpt-4-1106-preview"https://huggingface.co/spaces/Koshti10/Chat_literature/edit/main/app_drive.py
|
17 |
# model_name = "gpt-4-0125-preview"
|
18 |
search_type = "stuff"
|
19 |
input_question = ""
|
|
|
119 |
with gr.Row(equal_height=True):
|
120 |
with gr.Column():
|
121 |
with gr.Row():
|
122 |
+
pdf_files_dnd = gr.File(file_count='multiple', height=250, label="Upload PDF Files")
|
123 |
|
124 |
|
125 |
with gr.Column():
|
|
|
133 |
|
134 |
|
135 |
drive_link_input.submit(fn=create_data_from_drive, inputs=[drive_link_input], outputs=[status_message])
|
136 |
+
pdf_files_dnd.change(fn=check_pdfs, inputs=[pdf_files_dnd], outputs=[status_message], preprocess=False, postprocess=False)
|
137 |
|
138 |
chatbot = gr.Chatbot(height=750)
|
139 |
msg = gr.Textbox(label="Send a message", placeholder="Send a message",
|