Spaces:
Runtime error
Runtime error
File size: 477 Bytes
04d61ea |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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()
|