File size: 506 Bytes
a3f4f41
 
abac458
c79f323
a3f4f41
abac458
a3f4f41
abac458
a3f4f41
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import streamlit as st
from transformers import pipeline
from diffusers import StableDiffusionInstructPix2PixPipeline
import torch

model_id = "noobasuna/instruct-pix2pix-model"
# Load your model from the Hugging Face Hub
model = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None).to("cuda")
st.title("InstructME2ME")

prompt = st.text_input("Enter your prompt:")
if prompt:
    output = model(prompt)[0]["generated_text"]
    st.write(output)