Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ with gr.Row():
|
|
47 |
|
48 |
caption = gr.Textbox(label="Generated Caption")
|
49 |
|
50 |
-
def predict(img, model_name, max_tokens, temperature):
|
51 |
if model_name == "CLIP-GPT2":
|
52 |
return generate_caption_clipgpt(img, max_tokens, temperature)
|
53 |
elif model_name == "ViT-GPT2":
|
@@ -55,7 +55,6 @@ def predict(img, model_name, max_tokens, temperature):
|
|
55 |
elif model_name == "ViT-CoAttention":
|
56 |
return generate_caption_vitCoAtt(img)
|
57 |
elif model_name == "Baseline Model CNN-RNN":
|
58 |
-
print(img.name)
|
59 |
return generate_caption_cnnrnn(img)
|
60 |
else:
|
61 |
return "Caption generation for this model is not yet implemented."
|
|
|
47 |
|
48 |
caption = gr.Textbox(label="Generated Caption")
|
49 |
|
50 |
+
def predict(img, model_name, max_tokens, temperature, examples):
|
51 |
if model_name == "CLIP-GPT2":
|
52 |
return generate_caption_clipgpt(img, max_tokens, temperature)
|
53 |
elif model_name == "ViT-GPT2":
|
|
|
55 |
elif model_name == "ViT-CoAttention":
|
56 |
return generate_caption_vitCoAtt(img)
|
57 |
elif model_name == "Baseline Model CNN-RNN":
|
|
|
58 |
return generate_caption_cnnrnn(img)
|
59 |
else:
|
60 |
return "Caption generation for this model is not yet implemented."
|