jaketae commited on
Commit
b1f513f
1 Parent(s): cf352a6

feature: change radio buttons to dropdown

Browse files
Files changed (3) hide show
  1. app.py +3 -3
  2. image2text.py +1 -1
  3. text2image.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ import text2image
7
  PAGES = {"Text to Image": text2image, "Image to Text": image2text}
8
 
9
  st.sidebar.title("Navigation")
10
- model = st.sidebar.radio("Model", ["koclip/koclip", "koclip/koclip-large"])
11
- page = st.sidebar.radio("Go to", list(PAGES.keys()))
12
 
13
- PAGES[page].app(model)
7
  PAGES = {"Text to Image": text2image, "Image to Text": image2text}
8
 
9
  st.sidebar.title("Navigation")
10
+ model = st.sidebar.selectbox("Choose a model", ["koclip", "koclip-large"])
11
+ page = st.sidebar.selectbox("Choose a task", list(PAGES.keys()))
12
 
13
+ PAGES[page].app(f"koclip/{model}")
image2text.py CHANGED
@@ -6,7 +6,7 @@ from utils import load_model
6
  def app(model_name):
7
  model, processor = load_model(model_name)
8
 
9
- st.title("Text to Image Retrieval")
10
  st.markdown("""
11
  Some text goes in here.
12
  """)
6
  def app(model_name):
7
  model, processor = load_model(model_name)
8
 
9
+ st.title("Image to Text")
10
  st.markdown("""
11
  Some text goes in here.
12
  """)
text2image.py CHANGED
@@ -7,7 +7,7 @@ def app(model_name):
7
  model, processor = load_model(model_name)
8
 
9
 
10
- st.title("Text to Image Retrieval")
11
  st.markdown("""
12
  Some text goes in here.
13
  """)
7
  model, processor = load_model(model_name)
8
 
9
 
10
+ st.title("Text to Image")
11
  st.markdown("""
12
  Some text goes in here.
13
  """)