masdar commited on
Commit
f6a04da
·
1 Parent(s): 449c97f

upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -56,8 +56,8 @@ model.eval()
56
 
57
  def segment(input):
58
  inp = input
59
- x = inp.transpose([2, 0, 1]) # channels-first
60
- x = np.expand_dims(x, axis=0) # adding a batch dimension
61
 
62
  mean = x.mean(axis=(0, 2, 3))
63
  std = x.std(axis=(0, 2, 3))
@@ -89,13 +89,12 @@ examples = [["TCGA_CS_5395_19981004_12.png"],
89
 
90
  title = "Sistem Segmentasi Citra MRI Otak berbasis Artificial Intelligence"
91
  description = "This system is designed to help automate the process of accurately and efficiently segmenting brain MRIs into regions of interest. It does this by using a UBNet-Seg Architecture that has been trained on a large dataset of manually annotated brain images."
92
- # videos. Accurate evaluation of the motion and size of the left ventricle is crucial for the assessment of cardiac function and ejection fraction. In this interface, the user inputs apical-4-chamber images from echocardiography videos and the model will output a prediction of the localization of the left ventricle in blue. This model was trained on the publicly released EchoNet-Dynamic dataset of 10k echocardiogram videos with 20k expert annotations of the left ventricle and published as part of ‘Video-based AI for beat-to-beat assessment of cardiac function’ by Ouyang et al. in Nature, 2020."
93
 
94
  #thumbnail = "https://raw.githubusercontent.com/gradio-app/hub-echonet/master/thumbnail.png"
95
 
96
- #gr.Interface(segment, i, o, examples=examples, allow_flagging=False, analytics_enabled=False, thumbnail=thumbnail).launch()
97
  gr.Interface(segment, i, o,
98
  allow_flagging = False,
99
  description = description,
 
100
  examples = examples,
101
  analytics_enabled = False).launch()
 
56
 
57
  def segment(input):
58
  inp = input
59
+ x = inp.transpose([2, 0, 1])
60
+ x = np.expand_dims(x, axis=0)
61
 
62
  mean = x.mean(axis=(0, 2, 3))
63
  std = x.std(axis=(0, 2, 3))
 
89
 
90
  title = "Sistem Segmentasi Citra MRI Otak berbasis Artificial Intelligence"
91
  description = "This system is designed to help automate the process of accurately and efficiently segmenting brain MRIs into regions of interest. It does this by using a UBNet-Seg Architecture that has been trained on a large dataset of manually annotated brain images."
 
92
 
93
  #thumbnail = "https://raw.githubusercontent.com/gradio-app/hub-echonet/master/thumbnail.png"
94
 
 
95
  gr.Interface(segment, i, o,
96
  allow_flagging = False,
97
  description = description,
98
+ title=title,
99
  examples = examples,
100
  analytics_enabled = False).launch()