Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,11 @@ from PIL import Image
|
|
8 |
import base64
|
9 |
from dotenv import load_dotenv, find_dotenv
|
10 |
|
11 |
-
_ = load_dotenv(find_dotenv())
|
12 |
|
13 |
model_id = os.getenv("model_id")
|
14 |
hf_api_key = os.getenv("hf_api_key")
|
15 |
|
16 |
-
#api_url ="https://api-inference.huggingface.co/models/DunnBC22/flan-t5-base-text_summarization_data"
|
17 |
api_url =f"https://api-inference.huggingface.co/models/{model_id}"
|
18 |
|
19 |
def get_completion(inputs, parameters=None, ENDPOINT_URL=api_url):
|
|
|
8 |
import base64
|
9 |
from dotenv import load_dotenv, find_dotenv
|
10 |
|
11 |
+
_ = load_dotenv(find_dotenv())
|
12 |
|
13 |
model_id = os.getenv("model_id")
|
14 |
hf_api_key = os.getenv("hf_api_key")
|
15 |
|
|
|
16 |
api_url =f"https://api-inference.huggingface.co/models/{model_id}"
|
17 |
|
18 |
def get_completion(inputs, parameters=None, ENDPOINT_URL=api_url):
|