Sidharthkr commited on
Commit
134ba5b
·
1 Parent(s): f5b674b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,6 +1,9 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
- summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
 
 
 
4
  def summarymaker(instruction = "", tweets = ""):
5
  ARTICLE = f"""[INST] {instruction} [/INST] \\n [TWEETS] {tweets} [/TWEETS]"""
6
  print(ARTICLE)
 
1
  import gradio as gr
2
  from transformers import pipeline
3
+ hgsec = os.getenv("HF_token")
4
+ from huggingface_hub import login
5
+ login(token = hgsec)
6
+ summarizer = pipeline("summarization", model="Sidharthkr/InstructTweetSummarizer", use_auth_token = hgsec)#, trust_remote_code=True)
7
  def summarymaker(instruction = "", tweets = ""):
8
  ARTICLE = f"""[INST] {instruction} [/INST] \\n [TWEETS] {tweets} [/TWEETS]"""
9
  print(ARTICLE)