Devticks commited on
Commit
f6d476a
·
verified ·
1 Parent(s): c4a7be5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -34,12 +34,7 @@ from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDisc
34
 
35
 
36
  #title
37
- st.title("Easy OCR - Extract Text from Images")
38
-
39
- #subtitle
40
- st.markdown("## Optical Character Recognition - Using `easyocr`, `streamlit` - hosted on 🤗 Spaces")
41
-
42
- st.markdown("Link to the app - [image-to-text-app on 🤗 Spaces](https://huggingface.co/spaces/Amrrs/image-to-text-app)")
43
 
44
  #image uploader
45
  image = st.file_uploader(label = "Upload your image here",type=['png','jpg','jpeg'])
@@ -61,9 +56,9 @@ if image is not None:
61
 
62
  model_id = "timbrooks/instruct-pix2pix"
63
  pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
64
-
65
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
66
-
67
  images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images
68
 
69
  images[0].show()
@@ -81,4 +76,4 @@ if image is not None:
81
  else:
82
  st.write("Upload an Image")
83
 
84
- st.caption("Made with ❤️ by @1littlecoder. Credits to 🤗 Spaces for Hosting this ")
 
34
 
35
 
36
  #title
37
+ st.title("Make Your Videos More Beautiful with Devticks services")
 
 
 
 
 
38
 
39
  #image uploader
40
  image = st.file_uploader(label = "Upload your image here",type=['png','jpg','jpeg'])
 
56
 
57
  model_id = "timbrooks/instruct-pix2pix"
58
  pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
59
+ pipe.to("cuda")
60
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
61
+ prompt = st.text_input("Enter your prompt here")
62
  images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images
63
 
64
  images[0].show()
 
76
  else:
77
  st.write("Upload an Image")
78
 
79
+ st.caption("🤗")