tsengiii commited on
Commit
ee62d96
·
verified ·
1 Parent(s): 6a2977c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -9
app.py CHANGED
@@ -1,16 +1,20 @@
1
  import gradio as gr
2
 
3
- # Load the model
4
- interface = gr.load("models/KappaNeuro/ukiyo-e-art")
 
 
5
 
6
- # Customize the title and description in a different way
7
- def customize_ui(interface):
8
- interface.title = "最棒第一組"
9
- interface.description = "歡迎來到第一組的小天地"
10
-
11
- # Apply the custom title and description
12
- customize_ui(interface)
 
13
 
14
  # Launch the interface
15
  interface.launch()
16
 
 
 
1
  import gradio as gr
2
 
3
+ # Define a function for your model's functionality
4
+ def generate_image(prompt):
5
+ # 這裡應該是你的模型運行邏輯,你可以調用原本的模型功能
6
+ return "生成的圖片(這裡應該放你生成的圖片)"
7
 
8
+ # 自定義介面
9
+ interface = gr.Interface(
10
+ fn=generate_image,
11
+ inputs=gr.Textbox(label="輸入"),
12
+ outputs=gr.Image(label="輸出"),
13
+ title="最棒第一組",
14
+ description="歡迎來到第一組的小天地"
15
+ )
16
 
17
  # Launch the interface
18
  interface.launch()
19
 
20
+