from fastapi import FastAPI import os app = FastAPI() @app.get("/") async def root(): try: file_ls_str = ", ".join(os.listdir("large_files")) except: file_ls_str = "NA" return {"message": f"Hello World! File list: {file_ls_str}"}