Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import BartTokenizer, BartForConditionalGeneration
|
|
|
|
|
3 |
hf_token = os.getenv("HF_TOKEN")
|
4 |
-
if hf_token is None:
|
5 |
-
raise ValueError("HF_TOKEN environment variable is not set.")
|
6 |
|
7 |
# Load model and tokenizer from Hugging Face hub using the provided model name
|
8 |
model_name = "iimran/SAM-TheSummariserV2"
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import BartTokenizer, BartForConditionalGeneration
|
3 |
+
from huggingface_hub import hf_hub_download
|
4 |
+
|
5 |
hf_token = os.getenv("HF_TOKEN")
|
|
|
|
|
6 |
|
7 |
# Load model and tokenizer from Hugging Face hub using the provided model name
|
8 |
model_name = "iimran/SAM-TheSummariserV2"
|