xp3857 commited on
Commit
9391d90
1 Parent(s): cd2aac8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -2,12 +2,12 @@ import gradio as gr
2
  import requests
3
  import os
4
  import gradio as gr
5
- from diffusers import StableDiffusionPipeline
6
- import torch
7
 
8
- model_id = "runwayml/stable-diffusion-v1-5"
9
- pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.get_default_dtype())
10
- pipe = pipe.to("cpu")
11
 
12
 
13
 
@@ -23,11 +23,10 @@ h = "Q"
23
  def ac():
24
  def im_fn(put):
25
  if h == o:
26
- return model(put)
27
  elif h != o:
28
  return(None)
29
- def im_pipe(put):
30
- return pipe(prompt=put, negative_prompt="blury")
31
  '''
32
  num_images_per_prompt=n_images,
33
  num_inference_steps = int(steps),
 
2
  import requests
3
  import os
4
  import gradio as gr
5
+ #from diffusers import StableDiffusionPipeline
6
+ #import torch
7
 
8
+ #model_id = "runwayml/stable-diffusion-v1-5"
9
+ #pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.get_default_dtype())
10
+ #pipe = pipe.to("cpu")
11
 
12
 
13
 
 
23
  def ac():
24
  def im_fn(put):
25
  if h == o:
26
+ return model([put, negative_prompt="blury"])
27
  elif h != o:
28
  return(None)
29
+
 
30
  '''
31
  num_images_per_prompt=n_images,
32
  num_inference_steps = int(steps),