Spaces:
Paused
Paused
Download app.py from Ashrafb/Chat_with_pdf: direct link, hf CLI and curl.
- Browser
- Download file 737 Bytes
-
https://huggingface.co/spaces/Ashrafb/Chat_with_pdf/resolve/main/app.py
- Command line
-
hf download hf://spaces/Ashrafb/Chat_with_pdf/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Ashrafb/Chat_with_pdf/resolve/main/app.py
737 Bytes
| import streamlit as st | |
| import os | |
| from Chat_with_pdf_OpenAI import openai_pdf | |
| from Chat_with_pdf_LLM import LLM_pdf | |
| def main(): | |
| st.header("Chat with your PDF") | |
| LLM_model = st.selectbox("Select Model",("OpenAI", | |
| "google/flan-t5-large", | |
| "google/flan-ul2", | |
| "OpenAssistant/oasst-sft-1-pythia-12b", | |
| "bigscience/bloomz", | |
| )) | |
| if LLM_model == "OpenAI": | |
| openai_pdf() | |
| elif LLM_model == "TODO: ADD MORE...": | |
| st.warning('Please choose the Model', icon="⚠️") | |
| else: | |
| LLM_pdf(LLM_model) | |
| if __name__ == '__main__': | |
| main() | |