Raman Dutt commited on
Commit
98a8d11
·
1 Parent(s): 8a34e9e

info labels added

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -21,9 +21,9 @@ cuda_device = 1
21
  device = f"cuda:{cuda_device}" if torch.cuda.is_available() else "cpu"
22
 
23
  TITLE = "Demo for Generating Chest X-rays using Diferent Parameter-Efficient Fine-Tuned Stable Diffusion Pipelines"
24
- INFO_ABOUT_TEXT_PROMPT = "INFO_ABOUT_TEXT_PROMPT"
25
- INFO_ABOUT_GUIDANCE_SCALE = "INFO_ABOUT_GUIDANCE_SCALE"
26
- INFO_ABOUT_INFERENCE_STEPS = "INFO_ABOUT_INFERENCE_STEPS"
27
  EXAMPLE_TEXT_PROMPTS = [
28
  "No acute cardiopulmonary abnormality.",
29
  "Normal chest radiograph.",
@@ -291,6 +291,7 @@ iface = gr.Interface(
291
  gr.Dropdown(
292
  EXAMPLE_TEXT_PROMPTS,
293
  label="Input Text",
 
294
  value=EXAMPLE_TEXT_PROMPTS[0],
295
  ),
296
  gr.Slider(
@@ -298,6 +299,7 @@ iface = gr.Interface(
298
  maximum=10,
299
  value=4,
300
  step=1,
 
301
  label="Guidance Scale",
302
  ),
303
  gr.Slider(
@@ -305,6 +307,7 @@ iface = gr.Interface(
305
  maximum=100,
306
  value=75,
307
  step=1,
 
308
  label="Num Inference Steps",
309
  ),
310
  ],
 
21
  device = f"cuda:{cuda_device}" if torch.cuda.is_available() else "cpu"
22
 
23
  TITLE = "Demo for Generating Chest X-rays using Diferent Parameter-Efficient Fine-Tuned Stable Diffusion Pipelines"
24
+ INFO_ABOUT_TEXT_PROMPT = "Text prompt for generating the X-Ray"
25
+ INFO_ABOUT_GUIDANCE_SCALE = "Guidance Scale determines the strength of the guidance signal"
26
+ INFO_ABOUT_INFERENCE_STEPS = "Number of inference steps to use for generating the X-ray"
27
  EXAMPLE_TEXT_PROMPTS = [
28
  "No acute cardiopulmonary abnormality.",
29
  "Normal chest radiograph.",
 
291
  gr.Dropdown(
292
  EXAMPLE_TEXT_PROMPTS,
293
  label="Input Text",
294
+ info=INFO_ABOUT_TEXT_PROMPT,
295
  value=EXAMPLE_TEXT_PROMPTS[0],
296
  ),
297
  gr.Slider(
 
299
  maximum=10,
300
  value=4,
301
  step=1,
302
+ info=INFO_ABOUT_GUIDANCE_SCALE,
303
  label="Guidance Scale",
304
  ),
305
  gr.Slider(
 
307
  maximum=100,
308
  value=75,
309
  step=1,
310
+ info=INFO_ABOUT_INFERENCE_STEPS,
311
  label="Num Inference Steps",
312
  ),
313
  ],