Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,21 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Universal Code Generator (Hugging Face Inference) — Gradio
|
| 2 |
+
|
| 3 |
+
This Space uses a Hugging Face Inference API model to generate, explain, fix and convert code.
|
| 4 |
+
|
| 5 |
+
## How to configure
|
| 6 |
+
|
| 7 |
+
1. Add a secret in your Space settings:
|
| 8 |
+
- Name: `HF_TOKEN` (or `HUGGINGFACEHUB_API_TOKEN`)
|
| 9 |
+
- Value: your Hugging Face Inference API token
|
| 10 |
+
|
| 11 |
+
2. Optional: change the default model in the UI. Recommended code models:
|
| 12 |
+
- `bigcode/starcoder2-3b`
|
| 13 |
+
- `codellama/CodeLlama-7b-hf`
|
| 14 |
+
- `Qwen/Qwen2.5-Coder-7B-Instruct`
|
| 15 |
+
|
| 16 |
+
3. The app is built with Gradio. The Space will automatically start the app.
|
| 17 |
+
|
| 18 |
+
## Notes
|
| 19 |
+
- This app does **not** execute generated code. Always review code before running.
|
| 20 |
+
- For larger models prefer using the Inference API rather than downloading big models into the Space.
|
| 21 |
+
|