Spaces:
Sleeping
Sleeping
| # Import streamlit sebagai framework untuk aplikasi ini | |
| import streamlit as st | |
| from fileingestor import FileIngestor | |
| # Set the title for the Streamlit app | |
| # Mengatur judul dan subjudul untuk tampilan aplikasi nantinya | |
| st.title("PDF-Chatbot") | |
| st.write("Chat with your PDF documents!") | |
| st.write("Powered by Llama2") | |
| st.write("Made by Team John Snow") | |
| st.write("Please reset before uploading a new file") | |
| # Create a file uploader in the sidebar | |
| # Membuat sidebar dimana file pdf yang akan digunakan oleh chatbot bisa diupload | |
| uploaded_file = st.sidebar.file_uploader("Upload File", type="pdf") | |
| # Jika file telah diupload, maka panggil class FileIngestor yang akan mengolah file PDF yang telah disubmit | |
| if uploaded_file: | |
| file_ingestor = FileIngestor(uploaded_file) | |
| file_ingestor.handlefileandingest() |