import gradio as gr import os # Fetch token and model information token = os.environ["TOKEN"] model = os.environ["MODEL"] # Load the model from Hugging Face Spaces demo = gr.load(model, src="spaces", token=token) # Launch without 'fn', as it's not a valid argument for the launch method demo.launch(show_api=False, show_error=False, quiet=True, debug=False)