akhaliq HF Staff commited on
Commit
8cea1ba
Β·
1 Parent(s): 7017f14

rename deploy to publish

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -5285,7 +5285,7 @@ def send_to_sandbox(code):
5285
  max-width: 300px;
5286
  text-align: center;
5287
  ">
5288
- πŸš€ Deploy app to see videos with permanent URLs!
5289
  </div>
5290
  '''
5291
  # Insert the notice right after the opening body tag
@@ -5370,7 +5370,7 @@ def send_to_sandbox_with_refresh(code):
5370
  max-width: 300px;
5371
  text-align: center;
5372
  ">
5373
- πŸš€ Deploy app to see videos with permanent URLs!
5374
  </div>
5375
  '''
5376
  # Insert the notice right after the opening body tag
@@ -5764,7 +5764,7 @@ Generate the exact search/replace blocks needed to make these changes."""
5764
  <h3 style='margin-top: 0; color: white;'>⚑ Generating Your {language.upper()} App...</h3>
5765
  <p style='margin: 0.5em 0; opacity: 0.9;'>Code is being generated in real-time!</p>
5766
  <div style='background: rgba(255,255,255,0.2); padding: 1em; border-radius: 8px; margin: 1em 0;'>
5767
- <p style='margin: 0; font-size: 1.1em;'>πŸš€ Get ready to deploy once generation completes!</p>
5768
  </div>
5769
  </div>
5770
  """
@@ -5852,7 +5852,7 @@ Generate the exact search/replace blocks needed to make these changes."""
5852
  </p>
5853
  <p style='margin: 0.8em 0; font-size: 1.1em; display: flex; align-items: center;'>
5854
  <span style='background: rgba(255,255,255,0.2); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold;'>3</span>
5855
- Click <strong>"Deploy App"</strong>
5856
  </p>
5857
  <p style='margin: 0.8em 0; font-size: 1.1em; display: flex; align-items: center;'>
5858
  <span style='background: rgba(255,255,255,0.2); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold;'>4</span>
@@ -6289,7 +6289,7 @@ Generate the exact search/replace blocks needed to make these changes."""
6289
  </p>
6290
  <p style='margin: 0.8em 0; font-size: 1.1em; display: flex; align-items: center;'>
6291
  <span style='background: rgba(255,255,255,0.2); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold;'>3</span>
6292
- Click <strong>"Deploy App"</strong>
6293
  </p>
6294
  <p style='margin: 0.8em 0; font-size: 1.1em; display: flex; align-items: center;'>
6295
  <span style='background: rgba(255,255,255,0.2); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold;'>4</span>
@@ -7728,7 +7728,7 @@ with gr.Blocks(
7728
  label="App SDK",
7729
  visible=False
7730
  )
7731
- deploy_btn = gr.Button("πŸš€ Deploy App", variant="primary", visible=True)
7732
  deploy_status = gr.Markdown(visible=False, label="Deploy status")
7733
  # --- End move ---
7734
  # Removed media generation and web search UI components
@@ -7851,7 +7851,7 @@ with gr.Blocks(
7851
  gr.update(),
7852
  [],
7853
  [],
7854
- gr.update(value="πŸš€ Deploy App", visible=False),
7855
  gr.update(), # keep import header as-is
7856
  gr.update(), # keep import button as-is
7857
  gr.update() # language dropdown - no change
@@ -7883,7 +7883,7 @@ with gr.Blocks(
7883
  gr.update(value="", visible=False), # hide import textbox after submit
7884
  loaded_history,
7885
  history_to_chatbot_messages(loaded_history),
7886
- gr.update(value="πŸš€ Deploy App", visible=True),
7887
  gr.update(visible=False), # hide import header
7888
  gr.update(visible=False), # hide import button
7889
  gr.update(value=framework_type) # set language dropdown to framework type
@@ -7907,7 +7907,7 @@ with gr.Blocks(
7907
  gr.update(value="", visible=False), # hide import textbox after submit
7908
  loaded_history,
7909
  history_to_chatbot_messages(loaded_history),
7910
- gr.update(value="πŸš€ Deploy App", visible=False),
7911
  gr.update(visible=False), # hide import header
7912
  gr.update(visible=False), # hide import button
7913
  gr.update(value=framework_type) # set language dropdown to detected language
@@ -8277,7 +8277,7 @@ with gr.Blocks(
8277
  return "<div style='padding:1em;color:#888;text-align:center;'>Generate some code to see deployment options.</div>"
8278
  return f"""
8279
  <div style='padding: 1.5em; text-align: center; background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); color: white; border-radius: 10px;'>
8280
- <h3 style='margin-top: 0; color: white;'>πŸš€ Ready to Deploy!</h3>
8281
  <p style='margin: 0.5em 0; opacity: 0.9;'>Your {language.upper()} code is ready for deployment.</p>
8282
  <p style='margin: 0.5em 0; font-weight: bold;'>πŸ‘‰ Use the Deploy button in the sidebar to publish your app!</p>
8283
  </div>
@@ -8287,7 +8287,7 @@ with gr.Blocks(
8287
  clear_btn.click(hide_deploy_components, None, [deploy_btn])
8288
  # Reset button text when clearing
8289
  clear_btn.click(
8290
- lambda: gr.update(value="πŸš€ Deploy App"),
8291
  outputs=[deploy_btn]
8292
  )
8293
 
 
5285
  max-width: 300px;
5286
  text-align: center;
5287
  ">
5288
+ Deploy app to see videos with permanent URLs!
5289
  </div>
5290
  '''
5291
  # Insert the notice right after the opening body tag
 
5370
  max-width: 300px;
5371
  text-align: center;
5372
  ">
5373
+ Deploy app to see videos with permanent URLs!
5374
  </div>
5375
  '''
5376
  # Insert the notice right after the opening body tag
 
5764
  <h3 style='margin-top: 0; color: white;'>⚑ Generating Your {language.upper()} App...</h3>
5765
  <p style='margin: 0.5em 0; opacity: 0.9;'>Code is being generated in real-time!</p>
5766
  <div style='background: rgba(255,255,255,0.2); padding: 1em; border-radius: 8px; margin: 1em 0;'>
5767
+ <p style='margin: 0; font-size: 1.1em;'>Get ready to deploy once generation completes!</p>
5768
  </div>
5769
  </div>
5770
  """
 
5852
  </p>
5853
  <p style='margin: 0.8em 0; font-size: 1.1em; display: flex; align-items: center;'>
5854
  <span style='background: rgba(255,255,255,0.2); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold;'>3</span>
5855
+ Click <strong>"Publish"</strong>
5856
  </p>
5857
  <p style='margin: 0.8em 0; font-size: 1.1em; display: flex; align-items: center;'>
5858
  <span style='background: rgba(255,255,255,0.2); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold;'>4</span>
 
6289
  </p>
6290
  <p style='margin: 0.8em 0; font-size: 1.1em; display: flex; align-items: center;'>
6291
  <span style='background: rgba(255,255,255,0.2); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold;'>3</span>
6292
+ Click <strong>"Publish"</strong>
6293
  </p>
6294
  <p style='margin: 0.8em 0; font-size: 1.1em; display: flex; align-items: center;'>
6295
  <span style='background: rgba(255,255,255,0.2); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold;'>4</span>
 
7728
  label="App SDK",
7729
  visible=False
7730
  )
7731
+ deploy_btn = gr.Button("Publish", variant="primary", visible=True)
7732
  deploy_status = gr.Markdown(visible=False, label="Deploy status")
7733
  # --- End move ---
7734
  # Removed media generation and web search UI components
 
7851
  gr.update(),
7852
  [],
7853
  [],
7854
+ gr.update(value="Publish", visible=False),
7855
  gr.update(), # keep import header as-is
7856
  gr.update(), # keep import button as-is
7857
  gr.update() # language dropdown - no change
 
7883
  gr.update(value="", visible=False), # hide import textbox after submit
7884
  loaded_history,
7885
  history_to_chatbot_messages(loaded_history),
7886
+ gr.update(value="Publish", visible=True),
7887
  gr.update(visible=False), # hide import header
7888
  gr.update(visible=False), # hide import button
7889
  gr.update(value=framework_type) # set language dropdown to framework type
 
7907
  gr.update(value="", visible=False), # hide import textbox after submit
7908
  loaded_history,
7909
  history_to_chatbot_messages(loaded_history),
7910
+ gr.update(value="Publish", visible=False),
7911
  gr.update(visible=False), # hide import header
7912
  gr.update(visible=False), # hide import button
7913
  gr.update(value=framework_type) # set language dropdown to detected language
 
8277
  return "<div style='padding:1em;color:#888;text-align:center;'>Generate some code to see deployment options.</div>"
8278
  return f"""
8279
  <div style='padding: 1.5em; text-align: center; background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); color: white; border-radius: 10px;'>
8280
+ <h3 style='margin-top: 0; color: white;'>Ready to Deploy!</h3>
8281
  <p style='margin: 0.5em 0; opacity: 0.9;'>Your {language.upper()} code is ready for deployment.</p>
8282
  <p style='margin: 0.5em 0; font-weight: bold;'>πŸ‘‰ Use the Deploy button in the sidebar to publish your app!</p>
8283
  </div>
 
8287
  clear_btn.click(hide_deploy_components, None, [deploy_btn])
8288
  # Reset button text when clearing
8289
  clear_btn.click(
8290
+ lambda: gr.update(value="Publish"),
8291
  outputs=[deploy_btn]
8292
  )
8293