Spaces:
Build error
Build error
Update gradio_exit.py
Browse files- gradio_exit.py +4 -3
gradio_exit.py
CHANGED
|
@@ -8,11 +8,12 @@ import base64
|
|
| 8 |
from dotenv import load_dotenv, find_dotenv
|
| 9 |
|
| 10 |
_ = load_dotenv(find_dotenv()) # read local .env file
|
| 11 |
-
hf_api_key =
|
| 12 |
|
| 13 |
-
model_id = "shleifer/distilbart-cnn-12-6"
|
|
|
|
| 14 |
|
| 15 |
-
api_url ='https://api-inference.huggingface.co/models/DunnBC22/
|
| 16 |
|
| 17 |
headers = {"Authorization": f"Bearer {hf_api_key}"}
|
| 18 |
|
|
|
|
| 8 |
from dotenv import load_dotenv, find_dotenv
|
| 9 |
|
| 10 |
_ = load_dotenv(find_dotenv()) # read local .env file
|
| 11 |
+
hf_api_key =os.getenv(hf_api_key)
|
| 12 |
|
| 13 |
+
#model_id = "shleifer/distilbart-cnn-12-6"
|
| 14 |
+
model_id = "flan-t5-base-text_summarization_data"
|
| 15 |
|
| 16 |
+
api_url ='https://api-inference.huggingface.co/models/DunnBC22/{model_id}'
|
| 17 |
|
| 18 |
headers = {"Authorization": f"Bearer {hf_api_key}"}
|
| 19 |
|