krishnapal2308 commited on
Commit
dc65ada
·
verified ·
1 Parent(s): 35e87cb

description

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -30,7 +30,7 @@ While this current implementation may not support real-time processing, the pote
30
  def process_image_and_generate_output(image, model_selection):
31
  if image is None:
32
  return "Please select an image", None
33
- if model_selection == 'Basic Model (Results won't be good)':
34
  result = inference_script.evaluate(image)
35
  pred_caption = ' '.join(result).rsplit(' ', 1)[0]
36
  pred_caption = pred_caption.replace('<unk>', '')
@@ -57,9 +57,9 @@ def process_image_and_generate_output(image, model_selection):
57
 
58
  sample_images = [
59
  [os.path.join(os.path.dirname(__file__), "sample_images/1.jpg"), "ViT-GPT2"],
60
- [os.path.join(os.path.dirname(__file__), "sample_images/1.jpg"), 'Basic Model (Results won't be good)'],
61
  [os.path.join(os.path.dirname(__file__), "sample_images/3.jpg"), "ViT-GPT2"],
62
- [os.path.join(os.path.dirname(__file__), "sample_images/3.jpg"), 'Basic Model (Results won't be good)']
63
  ]
64
 
65
  # Create a dropdown to select sample image
 
30
  def process_image_and_generate_output(image, model_selection):
31
  if image is None:
32
  return "Please select an image", None
33
+ if model_selection == "Basic Model (Results won't be good)":
34
  result = inference_script.evaluate(image)
35
  pred_caption = ' '.join(result).rsplit(' ', 1)[0]
36
  pred_caption = pred_caption.replace('<unk>', '')
 
57
 
58
  sample_images = [
59
  [os.path.join(os.path.dirname(__file__), "sample_images/1.jpg"), "ViT-GPT2"],
60
+ [os.path.join(os.path.dirname(__file__), "sample_images/1.jpg"), "Basic Model (Results won't be good)"],
61
  [os.path.join(os.path.dirname(__file__), "sample_images/3.jpg"), "ViT-GPT2"],
62
+ [os.path.join(os.path.dirname(__file__), "sample_images/3.jpg"), "Basic Model (Results won't be good)"]
63
  ]
64
 
65
  # Create a dropdown to select sample image