makanaan commited on
Commit
91c367c
1 Parent(s): e093731

update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,13 +1,13 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
- from transformers import AutoTokenizer, AutoModelWithLMHead
5
  #from os import path
6
 
7
  #MODEL_DIRECTORY = "/models/mrm8488-t5-base-finetuned-emotion"
8
  tokenizer = AutoTokenizer.from_pretrained("tuner007/pegasus_paraphrase", use_fast=False)
9
  #if not path.exists(MODEL_DIRECTORY):
10
- model = AutoModelWithLMHead.from_pretrained("tuner007/pegasus_paraphrase")
11
  # model.save_pretrained(MODEL_DIRECTORY)
12
  #else:
13
  # model = AutoModelWithLMHead.from_pretrained(MODEL_DIRECTORY)
 
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
+ from transformers import AutoTokenizer, AutoModelForCausalLM
5
  #from os import path
6
 
7
  #MODEL_DIRECTORY = "/models/mrm8488-t5-base-finetuned-emotion"
8
  tokenizer = AutoTokenizer.from_pretrained("tuner007/pegasus_paraphrase", use_fast=False)
9
  #if not path.exists(MODEL_DIRECTORY):
10
+ model = AutoModelForCausalLM.from_pretrained("tuner007/pegasus_paraphrase")
11
  # model.save_pretrained(MODEL_DIRECTORY)
12
  #else:
13
  # model = AutoModelWithLMHead.from_pretrained(MODEL_DIRECTORY)