Update app.py
Browse files
app.py
CHANGED
@@ -120,14 +120,14 @@ with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Roboto Mono")]),
|
|
120 |
guid = gr.Markdown(md.guide)
|
121 |
with gr.Row():
|
122 |
with gr.Column(scale=1):
|
123 |
-
file_input = gr.File(file_count="single", type='filepath', label="
|
124 |
# gr.Markdown("Dont know what to select check out in Intro tab")
|
125 |
-
embed_model_dropdown = gr.Dropdown(embed_models, label="
|
126 |
with gr.Row():
|
127 |
btn = gr.Button("Submit", variant='primary')
|
128 |
clear = gr.ClearButton()
|
129 |
output = gr.Text(label='Vector Index')
|
130 |
-
llm_model_dropdown = gr.Dropdown(llm_models, label="
|
131 |
with gr.Column(scale=3):
|
132 |
gr.ChatInterface(
|
133 |
fn=respond,
|
@@ -137,7 +137,7 @@ with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Roboto Mono")]),
|
|
137 |
# cache_mode='lazy',
|
138 |
textbox=gr.Textbox(placeholder="Ask me any questions on the uploaded document!", container=False)
|
139 |
)
|
140 |
-
|
141 |
# Set up Gradio interactions
|
142 |
llm_model_dropdown.change(fn=set_llm_model, inputs=llm_model_dropdown)
|
143 |
btn.click(fn=load_files, inputs=[file_input, embed_model_dropdown], outputs=output)
|
|
|
120 |
guid = gr.Markdown(md.guide)
|
121 |
with gr.Row():
|
122 |
with gr.Column(scale=1):
|
123 |
+
file_input = gr.File(file_count="single", type='filepath', label="Upload document")
|
124 |
# gr.Markdown("Dont know what to select check out in Intro tab")
|
125 |
+
embed_model_dropdown = gr.Dropdown(embed_models, label="Select Embedding", interactive=True)
|
126 |
with gr.Row():
|
127 |
btn = gr.Button("Submit", variant='primary')
|
128 |
clear = gr.ClearButton()
|
129 |
output = gr.Text(label='Vector Index')
|
130 |
+
llm_model_dropdown = gr.Dropdown(llm_models, label="Select LLM", interactive=True)
|
131 |
with gr.Column(scale=3):
|
132 |
gr.ChatInterface(
|
133 |
fn=respond,
|
|
|
137 |
# cache_mode='lazy',
|
138 |
textbox=gr.Textbox(placeholder="Ask me any questions on the uploaded document!", container=False)
|
139 |
)
|
140 |
+
|
141 |
# Set up Gradio interactions
|
142 |
llm_model_dropdown.change(fn=set_llm_model, inputs=llm_model_dropdown)
|
143 |
btn.click(fn=load_files, inputs=[file_input, embed_model_dropdown], outputs=output)
|