Spaces:
Runtime error
Runtime error
| import os | |
| import gradio as gr | |
| hf_token = os.getenv('TEST_TOKEN') | |
| print(f"Hugging Face token: {hf_token}") | |
| if hf_token is None: | |
| raise ValueError("Hugging Face token not found") | |
| with gr.Blocks() as demo: | |
| token_input = gr.Textbox(label="Important token", value=hf_token) | |
| output = gr.Textbox(label="Important token output") | |
| btn = gr.Button("Submit") | |
| btn.click(lambda x:x, inputs=token_input, outputs=[output]) | |
| if __name__ == "__main__": | |
| demo.launch() | |