t
File size: 615 Bytes
907d257
8e8bbf0
907d257
 
8e8bbf0
907d257
8e8bbf0
907d257
 
 
 
 
 
 
 
8e8bbf0
 
 
 
907d257
 
8e8bbf0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)