Mr-Vicky-01 commited on
Commit
2eca8bb
1 Parent(s): 22e07a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -2,15 +2,16 @@ from langchain import HuggingFaceHub
2
  import gradio as gr
3
  import os
4
 
5
- os.environ['HUGGINGFACEHUB_API_TOKEN'] = os.getenv("HF_TOKEN")
6
 
7
  checkpoint = "Mr-Vicky-01/Bart-Finetuned-conversational-summarization"
8
 
9
  model = HuggingFaceHub(repo_id=checkpoint,
10
- model_kwargs={"temperature":0.1,
11
- "max_new_tokens":100,
12
- "do_sample":False
13
- })
 
14
 
15
  def generate_summary(text):
16
  summary = model(text)
 
2
  import gradio as gr
3
  import os
4
 
5
+ # os.environ['HUGGINGFACEHUB_API_TOKEN'] = os.getenv("HF_TOKEN")
6
 
7
  checkpoint = "Mr-Vicky-01/Bart-Finetuned-conversational-summarization"
8
 
9
  model = HuggingFaceHub(repo_id=checkpoint,
10
+ huggingfacehub_api_token = os.getenv("HF_TOKEN"),
11
+ model_kwargs={"temperature":0.1,
12
+ "max_new_tokens":100,
13
+ "do_sample":False
14
+ })
15
 
16
  def generate_summary(text):
17
  summary = model(text)