TK156 commited on
Commit
105fc53
·
1 Parent(s): d1fb809

fix: 基本のHello WorldでSpace復旧

Browse files

- 最もシンプルなGradioアプリ
- 画像処理機能は一旦削除
- Space安定性確保優先

Files changed (1) hide show
  1. app.py +6 -17
app.py CHANGED
@@ -1,23 +1,12 @@
1
  import gradio as gr
2
 
3
- def process_depth(image):
4
- """シンプルな深度マップ生成"""
5
- if image is None:
6
- return None, None
7
-
8
- return image, image # とりあえず同じ画像を返す
9
 
10
- # Gradioインターフェース
11
  demo = gr.Interface(
12
- fn=process_depth,
13
- inputs=gr.Image(type="pil"),
14
- outputs=[
15
- gr.Image(label="元画像"),
16
- gr.Image(label="深度マップ")
17
- ],
18
- title="深度推定API",
19
- description="画像をアップロードして深度マップを生成"
20
  )
21
 
22
- if __name__ == "__main__":
23
- demo.launch()
 
1
  import gradio as gr
2
 
3
+ def hello(name):
4
+ return f"Hello {name}! Space is working!"
 
 
 
 
5
 
 
6
  demo = gr.Interface(
7
+ fn=hello,
8
+ inputs="text",
9
+ outputs="text"
 
 
 
 
 
10
  )
11
 
12
+ demo.launch()