gstaff commited on
Commit
39cf431
β€’
1 Parent(s): bc91045

Notify when snippet copied.

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -148,6 +148,10 @@ def transcribe(audio):
148
  return result["text"]
149
 
150
 
 
 
 
 
151
  with gr.Blocks() as demo:
152
  gr.Markdown("<h1 align=\"center\">KiteWind πŸͺπŸƒ</h1>")
153
  gr.Markdown("<h4 align=\"center\">Chat-assisted web app creator by <a href=\"https://huggingface.co/gstaff\">@gstaff</a></h4>")
@@ -174,7 +178,7 @@ with gr.Blocks() as demo:
174
  with gr.Column():
175
  gr.Markdown("## 3. Export your app to share!")
176
  copy_snippet_btn = gr.Button("Copy app snippet to paste in another page")
177
- copy_snippet_btn.click(None, code_area, None, _js=copy_snippet_js)
178
  download_btn = gr.Button("Download app as a standalone file")
179
  download_btn.click(None, code_area, None, _js=download_code_js)
180
  with gr.Row():
 
148
  return result["text"]
149
 
150
 
151
+ def copy_notify(code):
152
+ gr.Info("App code snippet copied!")
153
+
154
+
155
  with gr.Blocks() as demo:
156
  gr.Markdown("<h1 align=\"center\">KiteWind πŸͺπŸƒ</h1>")
157
  gr.Markdown("<h4 align=\"center\">Chat-assisted web app creator by <a href=\"https://huggingface.co/gstaff\">@gstaff</a></h4>")
 
178
  with gr.Column():
179
  gr.Markdown("## 3. Export your app to share!")
180
  copy_snippet_btn = gr.Button("Copy app snippet to paste in another page")
181
+ copy_snippet_btn.click(copy_notify, code_area, None, _js=copy_snippet_js)
182
  download_btn = gr.Button("Download app as a standalone file")
183
  download_btn.click(None, code_area, None, _js=download_code_js)
184
  with gr.Row():