Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -90,30 +90,16 @@ with playground:
|
|
90 |
create_playground_header()
|
91 |
with gr.Tabs():
|
92 |
with gr.TabItem("Image"):
|
93 |
-
|
94 |
-
# topic = "Image Captioning"
|
95 |
-
# description = "Upload a image, check what AI understand and have vision on it."
|
96 |
-
# references = ["category: Image-to-Text",
|
97 |
-
# "model: [Salesforce/blip-image-captioning-base](https://huggingface.co/Salesforce/blip-image-captioning-base)"]
|
98 |
-
# image_pipeline_button = create_tabs_header(topic, description, references)
|
99 |
-
|
100 |
with gr.Row():
|
101 |
with gr.Column(scale=4):
|
102 |
-
# reference_list = "> " + "\n> ".join(references)
|
103 |
-
# content = f"## {topic}\n"
|
104 |
-
# content += f"### {description}\n"
|
105 |
-
# for ref in references:
|
106 |
-
# content += f"> {ref}\n"
|
107 |
-
# gr.Markdown(content)
|
108 |
gr.Markdown("""
|
109 |
## Image Captioning
|
110 |
### Upload a image, check what AI understand and have vision on it.
|
111 |
> category: Image-to-Text, model: [Salesforce/blip-image-captioning-base](https://huggingface.co/Salesforce/blip-image-captioning-base)
|
112 |
""")
|
113 |
-
|
114 |
with gr.Column(scale=1):
|
115 |
ITT_button = gr.Button(value="Start Process", variant="primary")
|
116 |
-
|
117 |
|
118 |
with gr.Row():
|
119 |
with gr.Column():
|
@@ -123,7 +109,7 @@ with playground:
|
|
123 |
with gr.Column(scale=4):
|
124 |
generated_textbox = gr.Textbox(lines=2, placeholder="", label="Generated Text")
|
125 |
with gr.Column(scale=1):
|
126 |
-
|
127 |
with gr.Row():
|
128 |
generated_image = gr.Image(label="Generated Image")
|
129 |
|
|
|
90 |
create_playground_header()
|
91 |
with gr.Tabs():
|
92 |
with gr.TabItem("Image"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
with gr.Row():
|
94 |
with gr.Column(scale=4):
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
gr.Markdown("""
|
96 |
## Image Captioning
|
97 |
### Upload a image, check what AI understand and have vision on it.
|
98 |
> category: Image-to-Text, model: [Salesforce/blip-image-captioning-base](https://huggingface.co/Salesforce/blip-image-captioning-base)
|
99 |
""")
|
|
|
100 |
with gr.Column(scale=1):
|
101 |
ITT_button = gr.Button(value="Start Process", variant="primary")
|
102 |
+
|
103 |
|
104 |
with gr.Row():
|
105 |
with gr.Column():
|
|
|
109 |
with gr.Column(scale=4):
|
110 |
generated_textbox = gr.Textbox(lines=2, placeholder="", label="Generated Text")
|
111 |
with gr.Column(scale=1):
|
112 |
+
ITT_Clear_button = gr.ClearButton(components=[img, generated_textbox], value="Clear")
|
113 |
with gr.Row():
|
114 |
generated_image = gr.Image(label="Generated Image")
|
115 |
|