Spaces:
Build error
Build error
feature: change radio buttons to dropdown
Browse files- app.py +3 -3
- image2text.py +1 -1
- 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.
|
11 |
-
page = st.sidebar.
|
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("
|
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
|
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 |
""")
|