Upload folder using huggingface_hub
Browse files- .github/workflows/deploy.yml +29 -0
- app.py +30 -16
.github/workflows/deploy.yml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy to GitHub Pages
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
|
| 8 |
+
permissions:
|
| 9 |
+
contents: read
|
| 10 |
+
pages: write
|
| 11 |
+
id-token: write
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
deploy:
|
| 15 |
+
runs-on: ubuntu-latest
|
| 16 |
+
steps:
|
| 17 |
+
- uses: actions/checkout@v3
|
| 18 |
+
|
| 19 |
+
- name: Setup Pages
|
| 20 |
+
uses: actions/configure-pages@v3
|
| 21 |
+
|
| 22 |
+
- name: Upload artifact
|
| 23 |
+
uses: actions/upload-pages-artifact@v2
|
| 24 |
+
with:
|
| 25 |
+
path: '.'
|
| 26 |
+
|
| 27 |
+
- name: Deploy to GitHub Pages
|
| 28 |
+
id: deployment
|
| 29 |
+
uses: actions/deploy-pages@v2
|
app.py
CHANGED
|
@@ -97,24 +97,38 @@ with gr.Blocks(title="π API Workflow Builder", theme=gr.themes.Soft()) as app
|
|
| 97 |
""")
|
| 98 |
|
| 99 |
with gr.Tab("π Page Builder"):
|
| 100 |
-
gr.Markdown("
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
<iframe
|
| 108 |
-
src="/file=index.html"
|
| 109 |
-
style="width: 100%; height: 100%; border: none;"
|
| 110 |
-
sandbox="allow-scripts allow-same-origin allow-forms allow-popups"
|
| 111 |
-
></iframe>
|
| 112 |
-
</div>
|
| 113 |
-
""",
|
| 114 |
-
label="Page Builder Editor"
|
| 115 |
-
)
|
| 116 |
|
| 117 |
gr.Markdown("""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
### δ½ΏγζΉ
|
| 119 |
1. ε·¦γ΅γ€γγγΌγγθ¦η΄ γγγ©γγ°οΌγγγγ
|
| 120 |
2. ε³γ΅γ€γγγΌγ§γΉγΏγ€γ«γγ«γΉγΏγγ€γΊ
|
|
|
|
| 97 |
""")
|
| 98 |
|
| 99 |
with gr.Tab("π Page Builder"):
|
| 100 |
+
gr.Markdown("""
|
| 101 |
+
### Visual Editor
|
| 102 |
+
|
| 103 |
+
**Note**: Due to Gradio limitations, the full GrapeJS editor works best when opened in a separate window.
|
| 104 |
+
|
| 105 |
+
Click the button below to open the full editor in a new tab:
|
| 106 |
+
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
gr.Markdown("""
|
| 109 |
+
<a href="https://kenken999.github.io/api-workflow-builder/" target="_blank"
|
| 110 |
+
style="display:inline-block; padding:15px 30px; background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 111 |
+
color:white; text-decoration:none; border-radius:8px; font-weight:bold; margin:20px 0;">
|
| 112 |
+
π Open Full Editor
|
| 113 |
+
</a>
|
| 114 |
+
""")
|
| 115 |
+
|
| 116 |
+
gr.Markdown("""
|
| 117 |
+
### Alternative: Localhost Setup
|
| 118 |
+
|
| 119 |
+
For full functionality with API integration, run locally:
|
| 120 |
+
|
| 121 |
+
```bash
|
| 122 |
+
# Clone the repository
|
| 123 |
+
git clone https://huggingface.co/spaces/kenken999/api-workflow-builder
|
| 124 |
+
cd api-workflow-builder
|
| 125 |
+
|
| 126 |
+
# Open index.html in your browser
|
| 127 |
+
# Or serve with a local server:
|
| 128 |
+
python -m http.server 8000
|
| 129 |
+
# Then visit: http://localhost:8000/index.html
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
### δ½ΏγζΉ
|
| 133 |
1. ε·¦γ΅γ€γγγΌγγθ¦η΄ γγγ©γγ°οΌγγγγ
|
| 134 |
2. ε³γ΅γ€γγγΌγ§γΉγΏγ€γ«γγ«γΉγΏγγ€γΊ
|