Rishabh12j commited on
Commit
3de5bfe
·
verified ·
1 Parent(s): 029e426

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -7,13 +7,12 @@ import json
7
  model_id = "7qrmoo93"
8
 
9
  api_key =os.getenv("API_Key")
10
- print(type(api_key))
11
- print(api_key)
12
 
13
 
14
  def res(data):
15
  print(data)
16
- 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},)
17
  print(resp.json())
18
  return resp.json()
19
 
 
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