Rishabh12j commited on
Commit
5b32125
·
verified ·
1 Parent(s): 1799d5d

Update app.py

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