Spaces:
Configuration error
Configuration error
Upload 4 files
Browse files- Dockerfile +17 -0
- README.md +32 -34
Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# Set working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Copy requirements and install dependencies
|
| 7 |
+
COPY requirements.txt .
|
| 8 |
+
RUN pip install --upgrade pip && pip install -r requirements.txt
|
| 9 |
+
|
| 10 |
+
# Copy application code
|
| 11 |
+
COPY app.py .
|
| 12 |
+
|
| 13 |
+
# Expose port for Gradio
|
| 14 |
+
EXPOSE 7860
|
| 15 |
+
|
| 16 |
+
# Run the app
|
| 17 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
|
@@ -1,34 +1,32 @@
|
|
| 1 |
-
--
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
1
|
| 18 |
-
2
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
- This app disables CUDA and evaluation at runtime to avoid GPU-only/compiled ops when running on CPU.
|
| 34 |
-
- Temporary outputs are cleaned a few minutes after each run to avoid hitting the 50GB ephemeral disk limit.
|
|
|
|
| 1 |
+
# WorldGen • Text-to-3D Scene Generator
|
| 2 |
+
|
| 3 |
+
This Hugging Face Space allows you to generate 3D scenes from English text prompts using the WorldGen framework.
|
| 4 |
+
|
| 5 |
+
## 🚀 How to Use
|
| 6 |
+
|
| 7 |
+
1. Enter a scene description in English (e.g., `a neon-lit cyberpunk street with rain reflections, highly detailed`)
|
| 8 |
+
2. Click **Generate 3D Scene**
|
| 9 |
+
3. Download the ZIP file containing the generated 3D assets
|
| 10 |
+
|
| 11 |
+
## 🔐 Hugging Face Token
|
| 12 |
+
|
| 13 |
+
This app downloads model files from Hugging Face Hub. If you encounter `401 Unauthorized` errors, you may need to provide a Hugging Face token.
|
| 14 |
+
|
| 15 |
+
### Setting Token in Space
|
| 16 |
+
|
| 17 |
+
1. Go to your Space → **Settings** → **Secrets**
|
| 18 |
+
2. Add a new secret:
|
| 19 |
+
- Name: `HF_TOKEN`
|
| 20 |
+
- Value: your Hugging Face access token
|
| 21 |
+
|
| 22 |
+
The app will automatically read this token via `os.getenv("HF_TOKEN")`.
|
| 23 |
+
|
| 24 |
+
## ⚙️ Runtime Notes
|
| 25 |
+
|
| 26 |
+
- CPU-only mode is enabled by default to avoid CUDA errors
|
| 27 |
+
- Temporary files are cleaned automatically after each run
|
| 28 |
+
- Model files are downloaded from `mit-han-lab/svdq-int4-flux.1-dev`
|
| 29 |
+
|
| 30 |
+
## 📦 Dependencies
|
| 31 |
+
|
| 32 |
+
See `requirements.txt` for full dependency list.
|
|
|
|
|
|