| from streamlit import session_state as sst |
| import asyncio |
|
|
| from pages import landing_page, model_inference_page |
|
|
| if "page" not in sst: |
| sst['page'] = 'landing_page' |
|
|
| def reset_sst(): |
| for key in list(sst.keys()): |
| if key != "page" and key != 'device': |
| sst.pop(key, None) |
|
|
|
|
| |
| async def main(): |
| """ |
| Main function that handles the navigation logic based on the current page. |
| |
| Returns: |
| None |
| """ |
|
|
| |
| if sst["page"] == "landing_page": |
| reset_sst() |
| await landing_page() |
|
|
| elif sst["page"] == "model_inference_page": |
| await model_inference_page() |
|
|
| asyncio.run(main()) |