|
Download README.md from KASHH-4/simple-ui: direct link, hf CLI and curl.
- Browser
- Download file 1.72 kB
-
https://huggingface.co/spaces/KASHH-4/simple-ui/resolve/main/README.md
- Command line
-
hf download hf://spaces/KASHH-4/simple-ui/README.md
-
curl -L -o README.md https://huggingface.co/spaces/KASHH-4/simple-ui/resolve/main/README.md
1.72 kB
| title: Phi Finetuned Chat | |
| emoji: π€ | |
| colorFrom: purple | |
| colorTo: pink | |
| sdk: docker | |
| sdk_version: "3.10" | |
| app_file: app.py | |
| pinned: false | |
| # Simple Text Generator | |
| A minimal Flask app for text generation with your fine-tuned model. | |
| ## Features | |
| - β Single page interface | |
| - β Simple prompt β output | |
| - β No complex questionnaire | |
| - β Full terminal logging | |
| - β Clean UI | |
| - β Docker ready for Hugging Face Spaces | |
| ## Files | |
| - `app.py` - Main Flask application (all-in-one file) | |
| - `requirements.txt` - Python dependencies | |
| - `Dockerfile` - Docker configuration for HF Spaces | |
| - `.dockerignore` - Files to exclude from Docker build | |
| ## Quick Deploy to Hugging Face Spaces | |
| 1. Create new Space at https://huggingface.co/new-space | |
| 2. Choose **Docker** as SDK (not Gradio or Streamlit) | |
| 3. Upload all 4 files from this folder: | |
| - `app.py` | |
| - `requirements.txt` | |
| - `Dockerfile` | |
| - `.dockerignore` | |
| 4. Wait for build to complete | |
| 5. Access your app! | |
| ## Local Usage | |
| ### With Python directly: | |
| ```bash | |
| pip install -r requirements.txt | |
| python app.py | |
| ``` | |
| Open http://localhost:7860 | |
| ### With Docker: | |
| ```bash | |
| docker build -t simple-text-gen . | |
| docker run -p 7860:7860 simple-text-gen | |
| ``` | |
| Open http://localhost:7860 | |
| ## Configuration | |
| Change model in `app.py`: | |
| ```python | |
| MODEL_NAME = "KASHH-4/phi_finetuned" # Your model | |
| ``` | |
| Adjust generation settings: | |
| ```python | |
| max_new_tokens=100 # Number of tokens to generate | |
| do_sample=False # Greedy decoding (faster) | |
| ``` | |
| ## Hardware Requirements | |
| - **Minimum**: 2 vCPU + 18GB RAM (CPU inference, ~60s per generation) | |
| - **Recommended**: T4 GPU + 16GB RAM (GPU inference, ~3-5s per generation) | |