Tonic commited on
Commit
80a9208
1 Parent(s): 4e5f073

Update app_template.py

Browse files
Files changed (1) hide show
  1. app_template.py +3 -3
app_template.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import os
3
  import requests
4
 
5
- zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
6
 
7
  HF_TOKEN = os.getenv("HF_TOKEN")
8
  HEADERS = {"Authorization": f"Bearer {HF_TOKEN}"}
@@ -21,9 +21,9 @@ def build_input_prompt(message, chatbot, system_prompt):
21
 
22
  def post_request_beta(payload):
23
  """
24
- Sends a POST request to the predefined Zephyr-7b-Beta URL and returns the JSON response.
25
  """
26
- response = requests.post(zephyr_7b_beta, headers=HEADERS, json=payload)
27
  response.raise_for_status() # Will raise an HTTPError if the HTTP request returned an unsuccessful status code
28
  return response.json()
29
 
 
2
  import os
3
  import requests
4
 
5
+ tulu = "https://tonic1-tulu.hf.space/--replicas/9sffh/"
6
 
7
  HF_TOKEN = os.getenv("HF_TOKEN")
8
  HEADERS = {"Authorization": f"Bearer {HF_TOKEN}"}
 
21
 
22
  def post_request_beta(payload):
23
  """
24
+ Sends a POST request to the predefined Tulu URL and returns the JSON response.
25
  """
26
+ response = requests.post(tulu, headers=HEADERS, json=payload)
27
  response.raise_for_status() # Will raise an HTTPError if the HTTP request returned an unsuccessful status code
28
  return response.json()
29