ZubairAhmed777 commited on
Commit
2d20c0d
·
verified ·
1 Parent(s): 398fdd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ from vocab import Vocabulary
21
  from model import *
22
 
23
  # Paths
24
- ckpt_dir = "./model-epoch-30.pth" # Path to the trained model
25
  ques_vocab_path = "./question_vocabs.txt" # Path to question vocabulary
26
  ans_vocab_path = "./annotation_vocabs.txt" # Path to answer vocabulary
27
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
@@ -49,7 +49,7 @@ def preprocess_question(question, ques_vocab, max_qu_len):
49
 
50
  # Load Model and Checkpoint
51
  def load_model():
52
- model = VQAModel(feature_size=FEATURE_SIZE,
53
  ques_vocab_size=ques_vocab.vocabulary_size,
54
  ans_vocab_size=ans_vocab.vocabulary_size,
55
  word_embed=WORD_EMBED,
 
21
  from model import *
22
 
23
  # Paths
24
+ ckpt_dir = "./best_model.pth" # Path to the trained model
25
  ques_vocab_path = "./question_vocabs.txt" # Path to question vocabulary
26
  ans_vocab_path = "./annotation_vocabs.txt" # Path to answer vocabulary
27
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
 
49
 
50
  # Load Model and Checkpoint
51
  def load_model():
52
+ model = VQAModel_attn(feature_size=FEATURE_SIZE,
53
  ques_vocab_size=ques_vocab.vocabulary_size,
54
  ans_vocab_size=ans_vocab.vocabulary_size,
55
  word_embed=WORD_EMBED,