Akjava commited on
Commit
1f88e84
·
1 Parent(s): e1c6089

change method name

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -61,7 +61,7 @@ from gradio_webhook_payload import WebhookPayload
61
  from sleep_per_last_token_model import SleepPerLastTokenModelLiteLLM
62
 
63
 
64
- def getenv(key, is_value_error_on_null=True):
65
  value = os.getenv(key)
66
  if value is None:
67
  from dotenv import load_dotenv
@@ -77,10 +77,10 @@ def getenv(key, is_value_error_on_null=True):
77
  LINEAR_ISSUE_LABEL = "huggingface-public" # only show issue with this label,I added for demo you can remove this
78
  LINEAR_WEBHOOK_LABEL = "Huggingface" # you have to create in linear before run script
79
  # set secret key on Space setting or .env(local)
80
- # hf_token = getenv("HF_TOKEN")
81
- groq_api_key = getenv("GROQ_API_KEY")
82
- api_key = getenv("LINEAR_API_KEY")
83
- webhook_key = getenv("LINEAR_WEBHOOK_KEY")
84
 
85
 
86
  if api_key is None:
 
61
  from sleep_per_last_token_model import SleepPerLastTokenModelLiteLLM
62
 
63
 
64
+ def get_env_value(key, is_value_error_on_null=True):
65
  value = os.getenv(key)
66
  if value is None:
67
  from dotenv import load_dotenv
 
77
  LINEAR_ISSUE_LABEL = "huggingface-public" # only show issue with this label,I added for demo you can remove this
78
  LINEAR_WEBHOOK_LABEL = "Huggingface" # you have to create in linear before run script
79
  # set secret key on Space setting or .env(local)
80
+ # hf_token = get_env_value("HF_TOKEN")
81
+ groq_api_key = get_env_value("GROQ_API_KEY")
82
+ api_key = get_env_value("LINEAR_API_KEY")
83
+ webhook_key = get_env_value("LINEAR_WEBHOOK_KEY")
84
 
85
 
86
  if api_key is None: