Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,11 +7,10 @@ import json
|
|
| 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": "\""+api_key+"\"" },json={'top_p': 0.75, 'prompt': data, 'num_beams': 4, 'temperature': 0.4},)
|
| 15 |
print(resp.json())
|
| 16 |
return resp.json()
|
| 17 |
|
|
|
|
| 7 |
model_id = "7qrmoo93"
|
| 8 |
|
| 9 |
api_key =os.getenv("API_Key")
|
|
|
|
| 10 |
|
| 11 |
def res(data):
|
| 12 |
print(data)
|
| 13 |
+
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},)
|
| 14 |
print(resp.json())
|
| 15 |
return resp.json()
|
| 16 |
|