Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,10 @@ from tensorflow.keras import layers
|
|
9 |
from tensorflow.keras.applications import efficientnet
|
10 |
from tensorflow.keras.layers import TextVectorization
|
11 |
|
|
|
|
|
|
|
|
|
12 |
# Desired image dimensions
|
13 |
IMAGE_SIZE = (299, 299)
|
14 |
# Vocabulary size
|
@@ -387,7 +391,6 @@ outputs = [
|
|
387 |
title = "Image Captioning using CNN and a transformer + "
|
388 |
description = "Implementing an image captioning model using a pretrained CNN model of Efficient Net and transformer to generate Image Caption for the uploaded image. Flickr8K Dataset was used for training."
|
389 |
article = " "
|
390 |
-
examples = [["pic 1.jpg"], ["pic 2.jpg"], ["pic 3.jpg"], ["pic 4.jpg"]]
|
391 |
|
392 |
gr.Interface(
|
393 |
generate_caption,
|
@@ -396,5 +399,5 @@ gr.Interface(
|
|
396 |
title=title,
|
397 |
description=description,
|
398 |
article=article,
|
399 |
-
examples=
|
400 |
-
).launch(
|
|
|
9 |
from tensorflow.keras.applications import efficientnet
|
10 |
from tensorflow.keras.layers import TextVectorization
|
11 |
|
12 |
+
#warning ignorer
|
13 |
+
import warnings
|
14 |
+
warnings.filterwarnings("ignore")
|
15 |
+
|
16 |
# Desired image dimensions
|
17 |
IMAGE_SIZE = (299, 299)
|
18 |
# Vocabulary size
|
|
|
391 |
title = "Image Captioning using CNN and a transformer + "
|
392 |
description = "Implementing an image captioning model using a pretrained CNN model of Efficient Net and transformer to generate Image Caption for the uploaded image. Flickr8K Dataset was used for training."
|
393 |
article = " "
|
|
|
394 |
|
395 |
gr.Interface(
|
396 |
generate_caption,
|
|
|
399 |
title=title,
|
400 |
description=description,
|
401 |
article=article,
|
402 |
+
examples=[["pic 1.jpg"], ["pic 2.jpg"], ["pic 3.jpg"], ["pic 4.jpg"]],
|
403 |
+
).launch()
|