LayBraid commited on
Commit
26cbfcd
·
1 Parent(s): 7db14ed

:construction: add search button

Browse files
Files changed (1) hide show
  1. text_to_image.py +10 -0
text_to_image.py CHANGED
@@ -1,6 +1,16 @@
1
  import streamlit as st
2
 
3
 
 
 
 
 
4
  def app():
5
  st.title("Welcome to Space Vector")
6
  st.text("You want search an image with given text.")
 
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
 
4
+ def get_image(text):
5
+ return "https://img.freepik.com/free-vector/illustration-space_29937-1093.jpg?w=2000"
6
+
7
+
8
  def app():
9
  st.title("Welcome to Space Vector")
10
  st.text("You want search an image with given text.")
11
+
12
+ text = st.text_input("Enter text: ")
13
+
14
+ if st.button("Search"):
15
+ st.image(get_image(text))
16
+