Spaces:
No application file
No application file
| import os | |
| import sys | |
| src_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..", "frontend")) | |
| sys.path.append(src_directory) | |
| import requests_app | |
| def display_contents(streamlit, option : str = None, ): | |
| try: | |
| cont = requests_app.get_api(option) | |
| data = streamlit.table(cont) | |
| return data | |
| except Exception as e: | |
| streamlit.error(f"An error occured while process data : {e}") |