Spaces:
Runtime error
Runtime error
acecalisto3
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -359,33 +359,26 @@ def next_step():
|
|
359 |
step5_update
|
360 |
]
|
361 |
def prev_step():
|
362 |
-
|
363 |
-
|
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 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
# Step
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
#
|
382 |
-
|
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()
|