vinayakdev commited on
Commit
35601d4
1 Parent(s): 918bd10

Check again

Browse files
Files changed (1) hide show
  1. generator.py +2 -2
generator.py CHANGED
@@ -37,7 +37,7 @@ import streamlit as st
37
  def load_model():
38
  hfm = pickle.load(open('t5_model.sav','rb'))
39
  hft = T5TokenizerFast.from_pretrained("t5-base")
40
- tok = et.from_pretrained("mrm8488/electra-small-finetuned-squadv2")
41
  model = pickle.load(open('electra_model.sav','rb'))
42
  # return hfm, hft,tok, model
43
  return hfm, hft, tok, model
@@ -108,7 +108,7 @@ def gen_question(inputs):
108
  # gen_question(f"answer: {string_query} context: The first C program said {string_query} "). #The format of the query to generate questions
109
 
110
  def tokenize(inputs) :
111
- inputs = self.tokenizer.batch_encode_plus(
112
  inputs,
113
  max_length="512",
114
  add_special_tokens=True,
 
37
  def load_model():
38
  hfm = pickle.load(open('t5_model.sav','rb'))
39
  hft = T5TokenizerFast.from_pretrained("t5-base")
40
+ # tok = att.from_pretrained("mrm8488/elect")
41
  model = pickle.load(open('electra_model.sav','rb'))
42
  # return hfm, hft,tok, model
43
  return hfm, hft, tok, model
 
108
  # gen_question(f"answer: {string_query} context: The first C program said {string_query} "). #The format of the query to generate questions
109
 
110
  def tokenize(inputs) :
111
+ inputs = hft.batch_encode_plus(
112
  inputs,
113
  max_length="512",
114
  add_special_tokens=True,