MrYxJ commited on
Commit
ca757e2
1 Parent(s): 8cdb1ba

update 0910

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -8,7 +8,7 @@
8
  Mail : yxj2017@gmail.com
9
  Github : https://github.com/MrYxJ
10
  Date : 2023-09-05 23:25:28
11
- LastEditTime : 2023-09-10 00:32:22
12
  Copyright (C) 2023 mryxj. All rights reserved.
13
  '''
14
  import gradio as gr
@@ -24,6 +24,9 @@ def get_calclops_result(model_name: str,
24
  bp_factor: float,
25
  output_unit: str):
26
 
 
 
 
27
  try:
28
  input_shape = eval(input_shape)
29
  if not isinstance(input_shape, tuple):
@@ -98,6 +101,7 @@ with gr.Blocks() as demo:
98
  post_to_hub = gr.Button(
99
  value="Report results in this model repo's discussions!\n(Will open in a new tab)", visible=False
100
  )
 
101
  btn.click(
102
  get_calclops_result,
103
  inputs=[inp, input_shape, access_token, bp_factor, output_unit],
 
8
  Mail : yxj2017@gmail.com
9
  Github : https://github.com/MrYxJ
10
  Date : 2023-09-05 23:25:28
11
+ LastEditTime : 2023-09-10 17:09:08
12
  Copyright (C) 2023 mryxj. All rights reserved.
13
  '''
14
  import gradio as gr
 
24
  bp_factor: float,
25
  output_unit: str):
26
 
27
+ if model_name == "0910":
28
+ return [f"# Happy Birthday to You 🎂🎂!", gr.update(visible=False), gr.update(visible=False)]
29
+
30
  try:
31
  input_shape = eval(input_shape)
32
  if not isinstance(input_shape, tuple):
 
101
  post_to_hub = gr.Button(
102
  value="Report results in this model repo's discussions!\n(Will open in a new tab)", visible=False
103
  )
104
+
105
  btn.click(
106
  get_calclops_result,
107
  inputs=[inp, input_shape, access_token, bp_factor, output_unit],