alexkueck commited on
Commit
630ab1c
1 Parent(s): 429709e

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +5 -0
utils.py CHANGED
@@ -558,6 +558,11 @@ def transfer_input(inputs):
558
 
559
  ########################################################
560
  ######## Hilfsfunktionen Datei-Upload ##################
 
 
 
 
 
561
  # Hochladen von Dateien
562
  def upload_pdf(file):
563
  if file is None:
 
558
 
559
  ########################################################
560
  ######## Hilfsfunktionen Datei-Upload ##################
561
+ def download_link(doc):
562
+ # URL für das Herunterladen der Datei
563
+ file_url = f"https://huggingface.co/spaces/alexkueck/SucheRAG/resolve/main/chroma/kkg/{doc['pfad']}?token=hf_token"
564
+ return f'<b><a href="{file_url}" target="_blank" style="color: #BB70FC; font-weight: bold;">{doc["titel"]}</a></b>'
565
+
566
  # Hochladen von Dateien
567
  def upload_pdf(file):
568
  if file is None: