tpei0009 commited on
Commit
abac458
·
1 Parent(s): c0a7b85

Initial commit

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,9 +1,10 @@
1
  import streamlit as st
2
  from transformers import pipeline
 
3
 
 
4
  # Load your model from the Hugging Face Hub
5
- model = pipeline(model="noobasuna/instruct-pix2pix-model")
6
-
7
  st.title("InstructME2ME")
8
 
9
  prompt = st.text_input("Enter your prompt:")
 
1
  import streamlit as st
2
  from transformers import pipeline
3
+ from diffusers import StableDiffusionInstructPix2PixPipeline
4
 
5
+ model_id = "noobasuna/instruct-pix2pix-model"
6
  # Load your model from the Hugging Face Hub
7
+ model = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None).to("cuda")
 
8
  st.title("InstructME2ME")
9
 
10
  prompt = st.text_input("Enter your prompt:")