Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

Getting started example should be fixed #372

Closed scls19fr closed 8 months ago

scls19fr commented 10 months ago

Hello,

On https://docs.taipy.io/en/latest/getting_started/ there is the following code


from taipy import Gui

page = """
Name: <|{input_name}|input|>
<|submit|button|on_action=submit_scenario|>

Message: <|{message}|text|>
"""

input_name = "Taipy"
message = None

def submit_scenario(state):
    state.scenario.input_name.write(state.input_name)
    state.scenario.submit(wait=True)
    state.message = scenario.message.read()

if __name__ == "__main__":
    Core().run()
    scenario = tp.create_scenario(scenario_cfg)
    Gui(page).run()

but I see several problems.

Kind regards

PS : my opinion is that some getting started examples should provide the whole code.

FlorianJacta commented 10 months ago

Great feedback! We provide the entire user code below (with a download button), but we could try to put directly the whole code. We wanted to make it as short as possible. We are discussing it.

jrobinAV commented 8 months ago

Closed as the documentation as been updated, specifying the code is just a fragment.