testing with llama3
Browse files- src/app.py +1 -1
- src/interface.py +3 -5
src/app.py
CHANGED
|
@@ -2,7 +2,7 @@ from interface import create_demo
|
|
| 2 |
from pdfchatbot import PDFChatBot
|
| 3 |
|
| 4 |
# Create Gradio interface
|
| 5 |
-
demo, chat_history, show_img, txt, submit_button, uploaded_pdf, slider1
|
| 6 |
|
| 7 |
# Create PDFChatBot instance
|
| 8 |
pdf_chatbot = PDFChatBot()
|
|
|
|
| 2 |
from pdfchatbot import PDFChatBot
|
| 3 |
|
| 4 |
# Create Gradio interface
|
| 5 |
+
demo, chat_history, show_img, txt, submit_button, uploaded_pdf, slider1 = create_demo()
|
| 6 |
|
| 7 |
# Create PDFChatBot instance
|
| 8 |
pdf_chatbot = PDFChatBot()
|
src/interface.py
CHANGED
|
@@ -10,10 +10,8 @@ def create_demo():
|
|
| 10 |
|
| 11 |
with gr.Row():
|
| 12 |
# Add sliders here
|
| 13 |
-
with gr.Column(
|
| 14 |
slider1 = gr.Slider(minimum=0, maximum=100, value=50, label="Chunk Size")
|
| 15 |
-
slider2 = gr.Slider(minimum=-10, maximum=10, value=0, label="Chunk Overlap")
|
| 16 |
-
|
| 17 |
with gr.Row():
|
| 18 |
with gr.Column(scale=0.60):
|
| 19 |
text_input = gr.Textbox(
|
|
@@ -25,9 +23,9 @@ def create_demo():
|
|
| 25 |
with gr.Column(scale=0.20):
|
| 26 |
uploaded_pdf = gr.UploadButton("📁 Upload PDF", file_types=[".pdf"])
|
| 27 |
|
| 28 |
-
return demo, chat_history, show_img, text_input, submit_button, uploaded_pdf, slider1
|
| 29 |
|
| 30 |
if __name__ == '__main__':
|
| 31 |
-
demo, chatbot, show_img, text_input, submit_button, uploaded_pdf, slider1
|
| 32 |
demo.queue()
|
| 33 |
demo.launch()
|
|
|
|
| 10 |
|
| 11 |
with gr.Row():
|
| 12 |
# Add sliders here
|
| 13 |
+
with gr.Column(): # Adjust scale as needed
|
| 14 |
slider1 = gr.Slider(minimum=0, maximum=100, value=50, label="Chunk Size")
|
|
|
|
|
|
|
| 15 |
with gr.Row():
|
| 16 |
with gr.Column(scale=0.60):
|
| 17 |
text_input = gr.Textbox(
|
|
|
|
| 23 |
with gr.Column(scale=0.20):
|
| 24 |
uploaded_pdf = gr.UploadButton("📁 Upload PDF", file_types=[".pdf"])
|
| 25 |
|
| 26 |
+
return demo, chat_history, show_img, text_input, submit_button, uploaded_pdf, slider1
|
| 27 |
|
| 28 |
if __name__ == '__main__':
|
| 29 |
+
demo, chatbot, show_img, text_input, submit_button, uploaded_pdf, slider1 = create_demo()
|
| 30 |
demo.queue()
|
| 31 |
demo.launch()
|