revi13 commited on
Commit
5cccad2
·
verified ·
1 Parent(s): 5376f3c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+ def check_token():
5
+ token = os.environ.get("HUGGINGFACE_HUB_TOKEN")
6
+ if token:
7
+ return "✅ トークン取得成功(最初の10文字): " + token[:10] + "..."
8
+ else:
9
+ return "❌ トークンが取得できません。Spacesの Secrets に設定してください。"
10
+
11
+ demo = gr.Interface(fn=check_token, inputs=[], outputs="text")
12
+ demo.launch()