wang4067 commited on
Commit
4c0ff2d
·
verified ·
1 Parent(s): 35595f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -1,6 +1,4 @@
1
- SOTA_API_BASE="http://13.230.243.208:50001/v1"
2
- SOTA_API_KEY="sk-ceqvswstgcoviiwwfeuixbfloclfttdimjckjzamgavysnsn"
3
- SOTA_API_MODEL="Llama-3.1-8B--Instruct-syllabary"
4
 
5
  import gradio as gr
6
  import requests
@@ -26,12 +24,12 @@ def respond(
26
  response = ""
27
 
28
  headers = {
29
- "Authorization": f"Bearer {SOTA_API_KEY}",
30
  "Content-Type": "application/json"
31
  }
32
 
33
  data = {
34
- "model": SOTA_API_MODEL,
35
  "messages": messages,
36
  "max_tokens": max_tokens,
37
  "temperature": temperature,
@@ -39,7 +37,7 @@ def respond(
39
  "stream": True
40
  }
41
 
42
- response = requests.post(f"{SOTA_API_BASE}/chat/completion", headers=headers, json=data)
43
 
44
  if response.status_code == 200:
45
  for token in response.iter_lines():
 
1
+
 
 
2
 
3
  import gradio as gr
4
  import requests
 
24
  response = ""
25
 
26
  headers = {
27
+ "Authorization": f"Bearer xxxx",
28
  "Content-Type": "application/json"
29
  }
30
 
31
  data = {
32
+ "model": "Llama-3.1-8B--Instruct-syllabary",
33
  "messages": messages,
34
  "max_tokens": max_tokens,
35
  "temperature": temperature,
 
37
  "stream": True
38
  }
39
 
40
+ response = requests.post("http://13.230.243.208:50001/v1/chat/completion", headers=headers, json=data)
41
 
42
  if response.status_code == 200:
43
  for token in response.iter_lines():