SHAMIL SHAHBAZ AWAN commited on
Update app.py
Browse files123486 unmodified lines9192939495969716 unmodified lines114115116117118119120121122123import gradio as gr# Define gravity constants for each planet as a percentage of Earth's gravity86 unmodified linesearth_weight_input = gr.Number(label="Enter your weight on Earth (kg)", interactive=True)planet_input = gr.Dropdown(choices=list(gravity_factors.keys()), label="Choose a planet", interactive=True)# Output section for the equivalent weightoutput = gr.Textbox(label="Equivalent Weight on Planet", interactive=False)# HTML component for balloon effect trigger16 unmodified lines</script>""")# Function to trigger balloon effect and then calculate weightdef trigger_balloon_and_weight(earth_weight, planet):result = calculate_weight(earth_weight, planet)# Trigger the balloon effect after calculating weightballoon_script.trigger() # Trigger the balloon effectreturn result123486 unmodified lines91929394959616 unmodified lines113114115116117118119120121import gradio as gr# Define gravity constants for each planet as a percentage of Earth's gravity86 unmodified linesearth_weight_input = gr.Number(label="Enter your weight on Earth (kg)", interactive=True)planet_input = gr.Dropdown(choices=list(gravity_factors.keys()), label="Choose a planet", interactive=True)output = gr.Textbox(label="Equivalent Weight on Planet", interactive=False)# HTML component for balloon effect trigger16 unmodified lines</script>""")# Function to trigger balloon effectdef trigger_balloon_and_weight(earth_weight, planet):result = calculate_weight(earth_weight, planet)balloon_script.trigger() # Trigger the balloon effectreturn result
app.py+2-4