Download app.py from Geek7/t: direct link, hf CLI and curl.
- Browser
- Download file 615 Bytes
-
https://huggingface.co/spaces/Geek7/t/resolve/main/app.py
- Command line
-
hf download hf://spaces/Geek7/t/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Geek7/t/resolve/main/app.py
615 Bytes
| 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) |