Spaces:
Sleeping
Sleeping
Deploy Myco from GitHub Actions
Browse files- README.md +36 -4
- scripts/deploy_space.py +5 -1
- ui/gradio_app.py +1 -0
README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
| 1 |
---
|
| 2 |
title: Myco
|
| 3 |
-
emoji:
|
| 4 |
-
|
| 5 |
-
colorTo: yellow
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.16.0
|
| 8 |
-
python_version: '3.13'
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
|
@@ -14,6 +12,30 @@ short_description: Build Small Hackathon Project
|
|
| 14 |
|
| 15 |
# 🍄 Myco
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
Myco is a cozy exploration game prototype for Gradio + Hugging Face Spaces. Myco, an AI mushroom companion, helps players discover strange fungi in a magical forest and collect them in a MycoDex.
|
| 18 |
|
| 19 |
## First 60 Seconds
|
|
@@ -91,6 +113,16 @@ Then open the local Gradio URL printed in the terminal.
|
|
| 91 |
|
| 92 |
## Hugging Face Space
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
**Live Space:** https://huggingface.co/spaces/byte-vortex/Myco
|
| 95 |
|
| 96 |
**GitHub repository:** https://github.com/YOUR_USERNAME/hf-gradio-small-hackathon-myco
|
|
|
|
| 1 |
---
|
| 2 |
title: Myco
|
| 3 |
+
emoji: 🍄
|
| 4 |
+
colorTo: green
|
|
|
|
| 5 |
sdk: gradio
|
| 6 |
sdk_version: 6.16.0
|
|
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
license: mit
|
|
|
|
| 12 |
|
| 13 |
# 🍄 Myco
|
| 14 |
|
| 15 |
+
Myco is a small Gradio game for Hugging Face Spaces. Explore a cozy forest with Myco, discover strange mushrooms, ask about them, study them, and collect them in your MycoDex.
|
| 16 |
+
|
| 17 |
+
**Live Space:** https://huggingface.co/spaces/byte-vortex/Myco
|
| 18 |
+
|
| 19 |
+
## First Play Loop
|
| 20 |
+
|
| 21 |
+
1. Click **Start Exploring**.
|
| 22 |
+
2. Discover a mushroom.
|
| 23 |
+
3. Ask Myco about it.
|
| 24 |
+
4. Choose **Study**, **Collect**, or **Eat**.
|
| 25 |
+
5. Build your **MycoDex** and unlock forest progress.
|
| 26 |
+
|
| 27 |
+
## What is included
|
| 28 |
+
|
| 29 |
+
- Gradio app entrypoint: `app.py`
|
| 30 |
+
- UI code: `ui/`
|
| 31 |
+
- Game logic: `game/`
|
| 32 |
+
- Mushroom model: `models/`
|
| 33 |
+
- Mushroom catalog: `data/mushrooms.json`
|
| 34 |
+
- Runtime dependency: `requirements.txt`
|
| 35 |
+
|
| 36 |
+
## Local development
|
| 37 |
+
|
| 38 |
+
```bash
|
| 39 |
Myco is a cozy exploration game prototype for Gradio + Hugging Face Spaces. Myco, an AI mushroom companion, helps players discover strange fungi in a magical forest and collect them in a MycoDex.
|
| 40 |
|
| 41 |
## First 60 Seconds
|
|
|
|
| 113 |
|
| 114 |
## Hugging Face Space
|
| 115 |
|
| 116 |
+
This repo is intended to run directly as a Gradio Space. Hugging Face Spaces reads the metadata at the top of this README, installs `requirements.txt`, and runs `app.py`.
|
| 117 |
+
|
| 118 |
+
No GitHub Actions deployment workflow is required. To deploy manually:
|
| 119 |
+
|
| 120 |
+
1. Create or open the Space at https://huggingface.co/spaces/byte-vortex/Myco.
|
| 121 |
+
2. Make sure the Space SDK is **Gradio**.
|
| 122 |
+
3. Upload or push this repository's files to the Space repository.
|
| 123 |
+
4. The Space should install `gradio==6.16.0` from `requirements.txt` and start from `app.py`.
|
| 124 |
+
|
| 125 |
+
The required runtime files are `README.md`, `app.py`, `requirements.txt`, `data/`, `game/`, `models/`, and `ui/`.
|
| 126 |
**Live Space:** https://huggingface.co/spaces/byte-vortex/Myco
|
| 127 |
|
| 128 |
**GitHub repository:** https://github.com/YOUR_USERNAME/hf-gradio-small-hackathon-myco
|
scripts/deploy_space.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
from __future__ import annotations
|
| 4 |
|
|
|
|
| 1 |
+
"""Optional Hugging Face Space deploy helper.
|
| 2 |
+
|
| 3 |
+
This script is intentionally minimal because CI may call it directly. If the
|
| 4 |
+
optional HF_BUILD_SMALL_HACKATHON_TOKEN secret is missing, it exits cleanly.
|
| 5 |
+
"""
|
| 6 |
|
| 7 |
from __future__ import annotations
|
| 8 |
|
ui/gradio_app.py
CHANGED
|
@@ -86,6 +86,7 @@ def build_app() -> gr.Blocks:
|
|
| 86 |
with gr.Column(scale=3):
|
| 87 |
chat = gr.Chatbot(value=welcome_history(), label="Myco Chat", height=360)
|
| 88 |
with gr.Row():
|
|
|
|
| 89 |
prompt_placeholder = "Myco, should I eat this?"
|
| 90 |
prompt = gr.Textbox(
|
| 91 |
label="Ask Myco",
|
|
|
|
| 86 |
with gr.Column(scale=3):
|
| 87 |
chat = gr.Chatbot(value=welcome_history(), label="Myco Chat", height=360)
|
| 88 |
with gr.Row():
|
| 89 |
+
prompt = gr.Textbox(label="Ask Myco", placeholder="Myco, should I eat this?", scale=4)
|
| 90 |
prompt_placeholder = "Myco, should I eat this?"
|
| 91 |
prompt = gr.Textbox(
|
| 92 |
label="Ask Myco",
|