SerdarHelli commited on
Commit
fb9f5c1
1 Parent(s): 18fd9e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -21,6 +21,10 @@ sys.path.append("stylegan3")
21
 
22
 
23
 
 
 
 
 
24
  def make_transform(translate: Tuple[float,float], angle: float):
25
  m = np.eye(3)
26
  s = np.sin(angle/360.0*np.pi*2)
@@ -64,9 +68,9 @@ def predict(Seed,noise_mode,truncation_psi,trans_x,trans_y,angle):
64
 
65
  noises=['const', 'random', 'none']
66
  interface=gr.Interface(fn=predict, title="Brain MR Image Generation with StyleGAN-2",
67
- description = "",
68
  article = "Author: S.Serdar Helli",
69
- inputs=[gr.inputs.Slider( minimum=0, maximum=2**10,label='Seed'),gr.inputs.Radio( choices=noises, default='const',label='Noise Mods'),
70
  gr.inputs.Slider(0, 2, step=0.05, default=1, label='Truncation psi'),
71
  gr.inputs.Slider(-1, 1, step=0.05, default=0, label='Translate X'),
72
  gr.inputs.Slider(-1, 1, step=0.05, default=0, label='Translate Y'),
 
21
 
22
 
23
 
24
+ DESCRIPTION = f'''This model generates healthy MR Brain Images.
25
+ ![Example](ex.png)
26
+ '''
27
+
28
  def make_transform(translate: Tuple[float,float], angle: float):
29
  m = np.eye(3)
30
  s = np.sin(angle/360.0*np.pi*2)
 
68
 
69
  noises=['const', 'random', 'none']
70
  interface=gr.Interface(fn=predict, title="Brain MR Image Generation with StyleGAN-2",
71
+ description = DESCRIPTION,
72
  article = "Author: S.Serdar Helli",
73
+ inputs=[gr.inputs.Slider( minimum=0, maximum=2**12,label='Seed'),gr.inputs.Radio( choices=noises, default='const',label='Noise Mods'),
74
  gr.inputs.Slider(0, 2, step=0.05, default=1, label='Truncation psi'),
75
  gr.inputs.Slider(-1, 1, step=0.05, default=0, label='Translate X'),
76
  gr.inputs.Slider(-1, 1, step=0.05, default=0, label='Translate Y'),