kenken999 commited on
Commit
aaf2f91
Β·
verified Β·
1 Parent(s): 61e6506

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. .github/workflows/deploy.yml +29 -0
  2. 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("### Visual Editor")
101
- gr.Markdown("Open the editor below to start building your workflow pages.")
102
-
103
- # Page Builder iframe
104
- page_builder_html = gr.HTML(
105
- value="""
106
- <div style="width: 100%; height: 800px; border: 2px solid #e2e8f0; border-radius: 8px; overflow: hidden;">
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. ε³γ‚΅γ‚€γƒ‰γƒγƒΌγ§γ‚Ήγ‚Ώγ‚€γƒ«γ‚’γ‚«γ‚Ήγ‚Ώγƒžγ‚€γ‚Ί