acecalisto3 commited on
Commit
539c2f3
·
verified ·
1 Parent(s): 0caeb15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -23
app.py CHANGED
@@ -359,33 +359,26 @@ def next_step():
359
  step5_update
360
  ]
361
  def prev_step():
362
- app_process.previous_step()
363
- return app_process.get_current_step_info(), update_visibility(app_process.current_step)
364
-
365
  next_button.click(next_step, outputs=[current_step, step1, step2, step3, step4, step5])
366
  prev_button.click(prev_step, outputs=[current_step, step1, step2, step3, step4, step5])
367
 
368
  # Step 1: Initialize App
369
  def init_app(name):
370
- app_process.app_name = name
371
- return f"App '{name}' initialized."
372
-
373
- init_app_button.click(init_app, inputs=[app_name_input], outputs=[components_display])
374
-
375
- # Step 2: Add Component
376
- add_component_button.click(app_process.add_component, inputs=[component_type], outputs=[components_display])
377
-
378
- # Step 3: Set Property
379
- set_property_button.click(app_process.set_component_property, inputs=[component_id, property_name, property_value], outputs=[components_display])
380
-
381
- # Step 4: Generate Code
382
- generate_code_button.click(app_process.generate_python_code, outputs=[generated_code])
383
-
384
- # Step 5: Deploy
385
- deploy_button.click(app_process.deploy_to_huggingface, outputs=[deployment_status])
386
-
387
- # Existing chat and terminal functionality
388
- chat_button.click(run_chat, inputs=[chat_input, chat_history], outputs=[chat_history, terminal_output])
389
- terminal_button.click(run_terminal_command, inputs=[terminal_input, terminal_output], outputs=[terminal_output])
390
 
391
  iface.launch()
 
359
  step5_update
360
  ]
361
  def prev_step():
362
+ app_process.previous_step()
363
+ return app_process.get_current_step_info(), update_visibility(app_process.current_step)
 
364
  next_button.click(next_step, outputs=[current_step, step1, step2, step3, step4, step5])
365
  prev_button.click(prev_step, outputs=[current_step, step1, step2, step3, step4, step5])
366
 
367
  # Step 1: Initialize App
368
  def init_app(name):
369
+ app_process.app_name = name
370
+ return f"App '{name}' initialized."
371
+ init_app_button.click(init_app, inputs=[app_name_input], outputs=[components_display])
372
+ # Step 2: Add Component
373
+ add_component_button.click(app_process.add_component, inputs=[component_type], outputs=[components_display])
374
+ # Step 3: Set Property
375
+ set_property_button.click(app_process.set_component_property, inputs=[component_id, property_name, property_value], outputs=[components_display])
376
+ # Step 4: Generate Code
377
+ generate_code_button.click(app_process.generate_python_code, outputs=[generated_code])
378
+ # Step 5: Deploy
379
+ deploy_button.click(app_process.deploy_to_huggingface, outputs=[deployment_status])
380
+ # Existing chat and terminal functionality
381
+ chat_button.click(run_chat, inputs=[chat_input, chat_history], outputs=[chat_history, terminal_output])
382
+ terminal_button.click(run_terminal_command, inputs=[terminal_input, terminal_output], outputs=[terminal_output])
 
 
 
 
 
 
383
 
384
  iface.launch()