Spaces:
Running
Running
Commit
Β·
6789f6f
1
Parent(s):
8a23417
π§ Fix HuggingFace Spaces deployment issues
Browse files- Remove textlens_env/ virtual environment from repository
- Add textlens_env/ to .gitignore to prevent future commits
- Update port configurations for HF Spaces compatibility
- This fixes the 'files larger than 10 MiB' deployment error
- .gitignore +1 -0
- README.md +4 -4
- app.py +1 -1
.gitignore
CHANGED
@@ -41,6 +41,7 @@ venv/
|
|
41 |
ENV/
|
42 |
env.bak/
|
43 |
venv.bak/
|
|
|
44 |
|
45 |
# IDE
|
46 |
.vscode/
|
|
|
41 |
ENV/
|
42 |
env.bak/
|
43 |
venv.bak/
|
44 |
+
textlens_env/
|
45 |
|
46 |
# IDE
|
47 |
.vscode/
|
README.md
CHANGED
@@ -77,7 +77,7 @@ textlens-ocr/
|
|
77 |
```
|
78 |
|
79 |
5. **Open your browser**
|
80 |
-
Navigate to `http://localhost:
|
81 |
|
82 |
### Quick Test
|
83 |
|
@@ -215,7 +215,7 @@ COPY requirements.txt .
|
|
215 |
RUN pip install -r requirements.txt
|
216 |
|
217 |
COPY . .
|
218 |
-
EXPOSE
|
219 |
|
220 |
CMD ["python", "app.py"]
|
221 |
```
|
@@ -225,14 +225,14 @@ CMD ["python", "app.py"]
|
|
225 |
```bash
|
226 |
# Production server
|
227 |
pip install gunicorn
|
228 |
-
gunicorn -w 4 -b 0.0.0.0:
|
229 |
```
|
230 |
|
231 |
## π Environment Variables
|
232 |
|
233 |
| Variable | Description | Default |
|
234 |
| ---------------------- | --------------------- | ---------------------- |
|
235 |
-
| `GRADIO_SERVER_PORT` | Server port |
|
236 |
| `TRANSFORMERS_CACHE` | Model cache directory | `~/.cache/huggingface` |
|
237 |
| `CUDA_VISIBLE_DEVICES` | GPU device selection | All available |
|
238 |
|
|
|
77 |
```
|
78 |
|
79 |
5. **Open your browser**
|
80 |
+
Navigate to `http://localhost:7860`
|
81 |
|
82 |
### Quick Test
|
83 |
|
|
|
215 |
RUN pip install -r requirements.txt
|
216 |
|
217 |
COPY . .
|
218 |
+
EXPOSE 7860
|
219 |
|
220 |
CMD ["python", "app.py"]
|
221 |
```
|
|
|
225 |
```bash
|
226 |
# Production server
|
227 |
pip install gunicorn
|
228 |
+
gunicorn -w 4 -b 0.0.0.0:7860 app:create_interface().app
|
229 |
```
|
230 |
|
231 |
## π Environment Variables
|
232 |
|
233 |
| Variable | Description | Default |
|
234 |
| ---------------------- | --------------------- | ---------------------- |
|
235 |
+
| `GRADIO_SERVER_PORT` | Server port | 7860 |
|
236 |
| `TRANSFORMERS_CACHE` | Model cache directory | `~/.cache/huggingface` |
|
237 |
| `CUDA_VISIBLE_DEVICES` | GPU device selection | All available |
|
238 |
|
app.py
CHANGED
@@ -36,7 +36,7 @@ def main():
|
|
36 |
interface.launch(
|
37 |
share=False,
|
38 |
server_name="0.0.0.0",
|
39 |
-
server_port=
|
40 |
show_error=True,
|
41 |
favicon_path=None,
|
42 |
ssl_verify=False
|
|
|
36 |
interface.launch(
|
37 |
share=False,
|
38 |
server_name="0.0.0.0",
|
39 |
+
server_port=7860,
|
40 |
show_error=True,
|
41 |
favicon_path=None,
|
42 |
ssl_verify=False
|