aditi2222 commited on
Commit
d0cf39e
1 Parent(s): d901185

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,13 +2,13 @@ import torch
2
  from transformers import (T5ForConditionalGeneration,T5Tokenizer)
3
  import gradio as gr
4
 
5
- best_model_path = "aditi2222/t5_paraphrase_updated"
6
  model = T5ForConditionalGeneration.from_pretrained(best_model_path)
7
- tokenizer = T5Tokenizer.from_pretrained("aditi2222/t5_paraphrase_updated")
8
 
9
  def tokenize_data(text):
10
  # Tokenize the review body
11
- input_ = "paraphrase: "+ str(text) + ' </s>'
12
  max_len = 64
13
  # tokenize inputs
14
  tokenized_inputs = tokenizer(input_, padding='max_length', truncation=True, max_length=max_len, return_attention_mask=True, return_tensors='pt')
 
2
  from transformers import (T5ForConditionalGeneration,T5Tokenizer)
3
  import gradio as gr
4
 
5
+ best_model_path = "aditi2222/paragus_models"
6
  model = T5ForConditionalGeneration.from_pretrained(best_model_path)
7
+ tokenizer = T5Tokenizer.from_pretrained("aditi2222/paragus_models")
8
 
9
  def tokenize_data(text):
10
  # Tokenize the review body
11
+ input_ = str(text) + ' </s>'
12
  max_len = 64
13
  # tokenize inputs
14
  tokenized_inputs = tokenizer(input_, padding='max_length', truncation=True, max_length=max_len, return_attention_mask=True, return_tensors='pt')