Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,10 @@ import json
|
|
| 5 |
|
| 6 |
# Replace the empty string with your model id below
|
| 7 |
model_id = "7qrmoo93"
|
| 8 |
-
|
| 9 |
def res(data):
|
| 10 |
print(data)
|
| 11 |
-
resp = requests.post("https://model-7qrmoo93.api.baseten.co/production/predict",headers={"Authorization":
|
| 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 |
+
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 |
|