lvwerra HF staff commited on
Commit
b1c5198
1 Parent(s): 2557806

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import json
2
  import os
3
  import shutil
 
4
 
5
  import gradio as gr
6
  from huggingface_hub import Repository
@@ -11,8 +12,9 @@ from share_btn import community_icon_html, loading_icon_html, share_js, share_bt
11
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
12
  API_URL = os.environ.get("API_URL")
13
 
14
- with open("https://huggingface.co/spaces/bigcode/bigcode-playground/resolve/main/HHH_prompt.txt", "r") as f:
15
- HHH_PROMPT = f.read() + "\n\n"
 
16
 
17
  FIM_PREFIX = "<fim_prefix>"
18
  FIM_MIDDLE = "<fim_middle>"
 
1
  import json
2
  import os
3
  import shutil
4
+ import requests
5
 
6
  import gradio as gr
7
  from huggingface_hub import Repository
 
12
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
13
  API_URL = os.environ.get("API_URL")
14
 
15
+
16
+ response = requests.get("https://huggingface.co/spaces/bigcode/bigcode-playground/resolve/main/HHH_prompt.txt")
17
+ HHH_PROMPT = response.text
18
 
19
  FIM_PREFIX = "<fim_prefix>"
20
  FIM_MIDDLE = "<fim_middle>"