Ahsen Khaliq commited on
Commit
d07ef02
·
1 Parent(s): 7c8e8fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,16 +10,16 @@ os.chdir("stylegan2-ada-pytorch")
10
  os.mkdir("outputs")
11
  os.mkdir("outputs/images")
12
 
13
- os.system("gdown --id '11qCXjJg0-VQaKrdufnC5-XTTQJdTHbOC'")
14
 
15
  def inference(truncation,seeds):
16
- os.system("python generate.py --outdir=./outputs/images/ --trunc="+str(truncation)+" --seeds="+str(int(seeds))+" --network=mammoGANesis.pkl")
17
  seeds = int(seeds)
18
  image = Image.open(f"./outputs/images/seed{seeds:04d}.png")
19
  return image
20
 
21
- title = "MammoGANesis"
22
- description = "Gradio demo for MammoGANesis: Controlled Generation of High-Resolution Mammograms for Radiology Education. This paper demonstrates the model’s ability to generate anatomically and medically relevant mammograms by achieving an average AUC of 0.54 in a double-blind study on four expert mammography radiologists to distinguish between generated and real images, ascribing to the high visual quality of the synthesized and edited mammograms, and to their potential use in advancing and facilitating medical education. To use it, add seed and truncation, or click one of the examples to load them. Read more at the links below."
23
 
24
  article = "<p style='text-align: center'><a href='https://cyrilzakka.github.io/radiology/2020/10/13/mammogenesis.html' target='_blank'>MammoGANesis: Controlled Generation of High-Resolution Mammograms for Radiology Education</a><center><a href='https://colab.research.google.com/drive/1ccC4CSWAEqx4BFXZGbPp8PxazdFBvxP4?usp=sharing'><img src='https://colab.research.google.com/assets/colab-badge.svg' alt='Open In Colab'/></a></center></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_mammogan' alt='visitor badge'></center>"
25
 
 
10
  os.mkdir("outputs")
11
  os.mkdir("outputs/images")
12
 
13
+ os.system("gdown --id '1DqbBf6298ech_o9Z-N2IA0FDxtw5_rlk'")
14
 
15
  def inference(truncation,seeds):
16
+ os.system("python generate.py --outdir=./outputs/images/ --trunc="+str(truncation)+" --seeds="+str(int(seeds))+" --network=OCTaGAN.pkl")
17
  seeds = int(seeds)
18
  image = Image.open(f"./outputs/images/seed{seeds:04d}.png")
19
  return image
20
 
21
+ title = "OCTaGAN"
22
+ description = "Gradio demo for OCTaGAN. This paper demonstrates the model’s ability to generate anatomically and medically relevant mammograms by achieving an average AUC of 0.54 in a double-blind study on four expert mammography radiologists to distinguish between generated and real images, ascribing to the high visual quality of the synthesized and edited mammograms, and to their potential use in advancing and facilitating medical education. To use it, add seed and truncation, or click one of the examples to load them. Read more at the links below."
23
 
24
  article = "<p style='text-align: center'><a href='https://cyrilzakka.github.io/radiology/2020/10/13/mammogenesis.html' target='_blank'>MammoGANesis: Controlled Generation of High-Resolution Mammograms for Radiology Education</a><center><a href='https://colab.research.google.com/drive/1ccC4CSWAEqx4BFXZGbPp8PxazdFBvxP4?usp=sharing'><img src='https://colab.research.google.com/assets/colab-badge.svg' alt='Open In Colab'/></a></center></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_mammogan' alt='visitor badge'></center>"
25