abokbot commited on
Commit
2be9921
·
1 Parent(s): 36fdc32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -3
app.py CHANGED
@@ -1,7 +1,5 @@
1
  import streamlit as st
2
  from transformers import T5TokenizerFast, T5ForConditionalGeneration
3
- import nltk
4
- import math
5
  import torch
6
 
7
  model_name = "abokbot/t5-end2end-questions-generation"
@@ -15,7 +13,6 @@ def load_model():
15
  print("Loading model...")
16
  tokenizer = T5TokenizerFast.from_pretrained("t5-base")
17
  model = T5ForConditionalGeneration.from_pretrained(model_name)
18
- nltk.download('punkt')
19
  print("Model loaded!")
20
  return tokenizer, model
21
 
 
1
  import streamlit as st
2
  from transformers import T5TokenizerFast, T5ForConditionalGeneration
 
 
3
  import torch
4
 
5
  model_name = "abokbot/t5-end2end-questions-generation"
 
13
  print("Loading model...")
14
  tokenizer = T5TokenizerFast.from_pretrained("t5-base")
15
  model = T5ForConditionalGeneration.from_pretrained(model_name)
 
16
  print("Model loaded!")
17
  return tokenizer, model
18