ZarinT commited on
Commit
60499c7
·
verified ·
1 Parent(s): 7954856

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,7 +28,7 @@ from datetime import datetime
28
 
29
  class GeminiLLM(Runnable):
30
  def __init__(self, model_name="models/gemini-1.5-pro-latest", api_key=None):
31
- self.api_key = api_key or st.secrets["GOOGLE_API_KEY"]
32
  if not self.api_key:
33
  raise ValueError("GOOGLE_API_KEY not found.")
34
  genai.configure(api_key=self.api_key)
@@ -258,7 +258,7 @@ def save_feedback_to_huggingface():
258
  filepath = os.path.join(tmpdir, filename)
259
  feedback_df.to_csv(filepath, index=False)
260
 
261
- api = HfApi(token=st.secrets["HF_TOKEN"])
262
  api.upload_file(
263
  path_or_fileobj=filepath,
264
  path_in_repo=filename,
 
28
 
29
  class GeminiLLM(Runnable):
30
  def __init__(self, model_name="models/gemini-1.5-pro-latest", api_key=None):
31
+ self.api_key = api_key or os.environ["GOOGLE_API_KEY"]
32
  if not self.api_key:
33
  raise ValueError("GOOGLE_API_KEY not found.")
34
  genai.configure(api_key=self.api_key)
 
258
  filepath = os.path.join(tmpdir, filename)
259
  feedback_df.to_csv(filepath, index=False)
260
 
261
+ api = HfApi(token=os.environ["HF_TOKEN"])
262
  api.upload_file(
263
  path_or_fileobj=filepath,
264
  path_in_repo=filename,