Rishabh12j commited on
Commit
0f7f5e4
·
verified ·
1 Parent(s): 3de5bfe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,12 +7,12 @@ import json
7
  model_id = "7qrmoo93"
8
 
9
  api_key =os.getenv("API_Key")
10
- print("\"Api-Key "+api_key+"\"")
11
 
12
 
13
  def res(data):
14
  print(data)
15
- resp = requests.post("https://model-7qrmoo93.api.baseten.co/production/predict",headers={"Authorization": "\"Api-Key "+api_key+"\""},json={'top_p': 0.75, 'prompt': data, 'num_beams': 4, 'temperature': 0.4},)
16
  print(resp.json())
17
  return resp.json()
18
 
 
7
  model_id = "7qrmoo93"
8
 
9
  api_key =os.getenv("API_Key")
10
+ token="\"Api-Key "+api_key+"\""
11
 
12
 
13
  def res(data):
14
  print(data)
15
+ resp = requests.post("https://model-7qrmoo93.api.baseten.co/production/predict",headers={"Authorization": token},json={'top_p': 0.75, 'prompt': data, 'num_beams': 4, 'temperature': 0.4},)
16
  print(resp.json())
17
  return resp.json()
18