Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,9 +49,9 @@ def create_tags(image):
|
|
| 49 |
for i in range(len(temp)):
|
| 50 |
text += temp[i][0] + (', ' if i < len(temp) - 1 else '')
|
| 51 |
text = text.replace(r"placeholder1, ", "")
|
| 52 |
-
text = text.replace(
|
| 53 |
text = text.replace("(", "\\(").replace(")", "\\)")
|
| 54 |
-
|
| 55 |
return text
|
| 56 |
|
| 57 |
demo = gr.Interface(
|
|
@@ -59,4 +59,4 @@ demo = gr.Interface(
|
|
| 59 |
inputs=[gr.Image(type="pil")],
|
| 60 |
outputs=["text"],
|
| 61 |
)
|
| 62 |
-
demo.launch()
|
|
|
|
| 49 |
for i in range(len(temp)):
|
| 50 |
text += temp[i][0] + (', ' if i < len(temp) - 1 else '')
|
| 51 |
text = text.replace(r"placeholder1, ", "")
|
| 52 |
+
text = text.replace("_", " ")
|
| 53 |
text = text.replace("(", "\\(").replace(")", "\\)")
|
| 54 |
+
print(text)
|
| 55 |
return text
|
| 56 |
|
| 57 |
demo = gr.Interface(
|
|
|
|
| 59 |
inputs=[gr.Image(type="pil")],
|
| 60 |
outputs=["text"],
|
| 61 |
)
|
| 62 |
+
demo.launch(debug = True)
|