Og2 commited on
Commit
2e73578
·
verified ·
1 Parent(s): 7079221

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -676,9 +676,9 @@ async def annotate(
676
 
677
 
678
  # Infos GitHub
679
- #GITHUB_REPO = "Og31330/FA_Dataset"
680
- #GITHUB_BASE_URL = f"https://api.github.com/repos/{GITHUB_REPO}"
681
  GITHUB_TOKEN = "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" # Remplace par ton token GitHub
 
 
682
 
683
  @app.post("/upload_csv/")
684
  async def upload_csv(
@@ -698,7 +698,7 @@ async def upload_csv(
698
  encoded_content = base64.b64encode(content).decode("utf-8")
699
 
700
  # 🔍 Vérification si le fichier existe déjà sur GitHub pour récupérer le sha
701
- file_url = f"{GITHUB_BASE_URL}/contents/csv/{csv_filename}"
702
  headers = {
703
  "Authorization": f"Bearer {GITHUB_TOKEN}",
704
  "Accept": "application/vnd.github+json"
 
676
 
677
 
678
  # Infos GitHub
 
 
679
  GITHUB_TOKEN = "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" # Remplace par ton token GitHub
680
+ GITHUB_REPO = "Og31330/FA_Dataset"
681
+ GITHUB_BASE_URL_CSV = f"https://api.github.com/repos/{GITHUB_REPO}"
682
 
683
  @app.post("/upload_csv/")
684
  async def upload_csv(
 
698
  encoded_content = base64.b64encode(content).decode("utf-8")
699
 
700
  # 🔍 Vérification si le fichier existe déjà sur GitHub pour récupérer le sha
701
+ file_url = f"{GITHUB_BASE_URL_CSV}/contents/csv/{csv_filename}"
702
  headers = {
703
  "Authorization": f"Bearer {GITHUB_TOKEN}",
704
  "Accept": "application/vnd.github+json"