Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,76 +3,26 @@ title: Document Parser GPT
|
|
| 3 |
emoji: π
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
-
sdk:
|
| 7 |
app_port: 8501
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
-
#
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
## π Features
|
| 25 |
-
|
| 26 |
-
β
Upload multiple document types
|
| 27 |
-
β
Ask natural language questions
|
| 28 |
-
β
Adjustable temperature setting
|
| 29 |
-
β
Download conversation history (TXT or JSON)
|
| 30 |
-
β
Clean UI built with Streamlit
|
| 31 |
-
β
Runs in Docker (Hugging Face Space compatible)
|
| 32 |
-
|
| 33 |
-
---
|
| 34 |
-
|
| 35 |
-
## π§ How to Configure
|
| 36 |
-
|
| 37 |
-
1. **API Key**
|
| 38 |
-
Paste your OpenAI API key in the sidebar inside the app.
|
| 39 |
-
|
| 40 |
-
2. **Model Temperature**
|
| 41 |
-
Adjust how creative or focused GPTβs responses are.
|
| 42 |
-
|
| 43 |
-
3. **File Types Supported**
|
| 44 |
-
PDF, DOCX, TXT, RTF, HTML.
|
| 45 |
-
|
| 46 |
-
---
|
| 47 |
-
|
| 48 |
-
## π‘ Example Use Cases
|
| 49 |
-
|
| 50 |
-
- Summarizing legal documents
|
| 51 |
-
- Extracting info from academic papers
|
| 52 |
-
- Chatting with contracts or business reports
|
| 53 |
-
- Building a Q&A assistant over personal notes
|
| 54 |
-
|
| 55 |
-
---
|
| 56 |
-
|
| 57 |
-
## π³ Docker Instructions (Handled by HF Space)
|
| 58 |
-
|
| 59 |
-
This app uses a `Dockerfile` to install dependencies and run Streamlit. No manual setup needed on your end.
|
| 60 |
-
|
| 61 |
-
Make sure you have:
|
| 62 |
-
|
| 63 |
-
- `Dockerfile` at the root
|
| 64 |
-
- `requirements.txt` listing Python dependencies
|
| 65 |
-
- `src/streamlit_app.py` as your main app script
|
| 66 |
-
|
| 67 |
-
---
|
| 68 |
-
|
| 69 |
-
## π‘οΈ Notes
|
| 70 |
-
|
| 71 |
-
- No OpenAI key is stored or logged β itβs used only at runtime in your session.
|
| 72 |
-
- This app does **not** send uploaded files anywhere; all processing is local in the container.
|
| 73 |
-
|
| 74 |
-
---
|
| 75 |
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
|
|
|
|
|
|
|
|
| 3 |
emoji: π
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
+
sdk: streamlit
|
| 7 |
app_port: 8501
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Document Parser Streamlit App
|
| 12 |
|
| 13 |
+
This is a Streamlit app for uploading documents and chatting with a GPT-4 powered assistant.
|
| 14 |
|
| 15 |
+
## Features
|
| 16 |
|
| 17 |
+
- Upload multiple document types (PDF, DOCX, TXT, etc.)
|
| 18 |
+
- Ask questions about the uploaded documents
|
| 19 |
+
- Download the conversation as TXT or JSON
|
| 20 |
+
- Simple settings for OpenAI API key and model temperature
|
| 21 |
|
| 22 |
+
## Important Configuration
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
To avoid permission issues on Hugging Face Spaces, the following environment variable is set in the app:
|
| 25 |
|
| 26 |
+
```python
|
| 27 |
+
import os
|
| 28 |
+
os.environ["STREAMLIT_CONFIG_DIR"] = "/tmp/.streamlit"
|