Spaces:
Runtime error
Runtime error
resize input img
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def download_url_img(url):
|
|
59 |
|
60 |
|
61 |
def search(mode, image, text):
|
62 |
-
|
63 |
translator = Translator(from_lang="chinese",to_lang="english")
|
64 |
text = translator.translate(text)
|
65 |
if mode == T2I:
|
@@ -123,7 +123,7 @@ if __name__ == "__main__":
|
|
123 |
fn=search,
|
124 |
inputs=[
|
125 |
gr.inputs.Radio([I2I, T2I]),
|
126 |
-
gr.inputs.Image(label="Image to search", optional=True),
|
127 |
gr.inputs.Textbox(
|
128 |
lines=1, label="Text query", placeholder="Introduce the search text...",
|
129 |
),
|
|
|
59 |
|
60 |
|
61 |
def search(mode, image, text):
|
62 |
+
|
63 |
translator = Translator(from_lang="chinese",to_lang="english")
|
64 |
text = translator.translate(text)
|
65 |
if mode == T2I:
|
|
|
123 |
fn=search,
|
124 |
inputs=[
|
125 |
gr.inputs.Radio([I2I, T2I]),
|
126 |
+
gr.inputs.Image(shape=(512, 512), label="Image to search", optional=True),
|
127 |
gr.inputs.Textbox(
|
128 |
lines=1, label="Text query", placeholder="Introduce the search text...",
|
129 |
),
|