import streamlit as st from tungstenkit import models # Load Tungsten AI model model = models.get("text-to-image") # Streamlit app title st.title("Text to Image Generation with Tungsten AI") # User input for text text_input = st.text_area("Enter text for image generation:") # Generate Image button if st.button("Generate Image"): # Generate image based on input text result = model.predict({"prompt": text_input}) # Get the image path from the result image_path = result["image"] # Display the generated image st.image(image_path, caption="Generated Image", use_column_width=True)