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)