prakhar patidar commited on
Commit
7fa416f
·
1 Parent(s): ef0cf73

updated basic apps

Browse files
Files changed (1) hide show
  1. app.py +21 -2
app.py CHANGED
@@ -1,4 +1,23 @@
1
  import streamlit as st
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
+ # from diffusers import StableDiffusionPipeline
4
+ # import torch
5
+
6
+ # model_id = "runwayml/stable-diffusion-v1-5"
7
+ # pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
8
+
9
+ # pipe = pipe.to("cuda")
10
+
11
+ # prompt = "a photo of an astronaut riding a horse on mars"
12
+ # image = pipe(prompt).images[0]
13
+ # st.image(image)
14
+
15
+
16
+ with st.form("tti_form"):
17
+ st.write("Text to Image.")
18
+ prompt = st.text_input("Enter Prompt")
19
+ # Every form must have a submit button.
20
+ submitted = st.form_submit_button("Submit")
21
+ if submitted:
22
+ st.write("prompt", prompt)
23
+