Hi Everyone
I’m trying to run ‘L3_Image_generation_app.ipynb’ locally.
The endpoint is read from the env variable ‘HF_API_TTI_BASE’
ENDPOINT_URL=os.environ[‘HF_API_TTI_BASE’]
Which is the value of this variable?
Is there any workaround to avoid the env variable and connect directly to the model ENDPOINT?
At the moment I got the following error:
KeyError Traceback (most recent call last)
Cell In[2], line 5
2 import requests, json
4 #Text-to-image endpoint
----> 5 def get_completion(inputs, parameters=None, ENDPOINT_URL=os.environ[‘HF_API_TTI_BASE’]):
6 headers = {
7 “Authorization”: f"Bearer {hf_api_key}",
8 “Content-Type”: “application/json”
9 }
10 data = { “inputs”: inputs }
File :679, in getitem(self, key)
KeyError: ‘HF_API_TTI_BASE’
Thanks in advance.
Fabio