Spaces:
Sleeping
Sleeping
Samarth991
commited on
Commit
•
2b30343
1
Parent(s):
94e521a
Changed UI
Browse files
app.py
CHANGED
@@ -117,19 +117,21 @@ with gr.Blocks(css=css) as demo:
|
|
117 |
|
118 |
with gr.Column():
|
119 |
with gr.Box():
|
|
|
120 |
LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection',info='LLM Service')
|
121 |
-
|
|
|
122 |
with gr.Column():
|
123 |
-
with gr.
|
124 |
-
file_extension = gr.Dropdown(FILE_EXT, label="File Extensions", info="Select your files extensions!")
|
125 |
pdf_doc = gr.File(label="Upload File to start QA", file_types=FILE_EXT, type="file")
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
|
130 |
chatbot = gr.Chatbot()
|
131 |
question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter")
|
132 |
submit_button = gr.Button("Send Message")
|
|
|
133 |
load_pdf.click(loading_file, None, langchain_status, queue=False)
|
134 |
load_pdf.click(document_loader, inputs=[pdf_doc,API_key,file_extension,LLM_option], outputs=[langchain_status], queue=False)
|
135 |
|
|
|
117 |
|
118 |
with gr.Column():
|
119 |
with gr.Box():
|
120 |
+
gr.Row()
|
121 |
LLM_option = gr.Dropdown(['HuggingFace','OpenAI'],label='Large Language Model Selection',info='LLM Service')
|
122 |
+
file_extension = gr.Dropdown(FILE_EXT, label="File Extensions", info="Select your files extensions!")
|
123 |
+
API_key = gr.Textbox(label="Add API key", type="password")
|
124 |
with gr.Column():
|
125 |
+
with gr.Box():
|
|
|
126 |
pdf_doc = gr.File(label="Upload File to start QA", file_types=FILE_EXT, type="file")
|
127 |
+
with gr.Row():
|
128 |
+
load_pdf = gr.Button("Load file to langchain")
|
129 |
+
langchain_status = gr.Textbox(label="Status", placeholder="", interactive=True)
|
130 |
|
131 |
chatbot = gr.Chatbot()
|
132 |
question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter")
|
133 |
submit_button = gr.Button("Send Message")
|
134 |
+
|
135 |
load_pdf.click(loading_file, None, langchain_status, queue=False)
|
136 |
load_pdf.click(document_loader, inputs=[pdf_doc,API_key,file_extension,LLM_option], outputs=[langchain_status], queue=False)
|
137 |
|