Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import json
|
|
5 |
def generate_minecraft_command(description):
|
6 |
headers = {
|
7 |
'Content-Type': 'application/json',
|
8 |
-
'Authorization': 'Bearer
|
9 |
}
|
10 |
|
11 |
payload = {
|
@@ -13,7 +13,7 @@ def generate_minecraft_command(description):
|
|
13 |
'max_tokens': 50
|
14 |
}
|
15 |
|
16 |
-
response = requests.post('https://
|
17 |
data = json.loads(response.text)
|
18 |
if 'choices' in data and len(data['choices']) > 0:
|
19 |
command = data['choices'][0]['text'].strip()
|
|
|
5 |
def generate_minecraft_command(description):
|
6 |
headers = {
|
7 |
'Content-Type': 'application/json',
|
8 |
+
'Authorization': 'Bearer dummy'
|
9 |
}
|
10 |
|
11 |
payload = {
|
|
|
13 |
'max_tokens': 50
|
14 |
}
|
15 |
|
16 |
+
response = requests.post('https://copilot.github1s.tk/', headers=headers, json=payload)
|
17 |
data = json.loads(response.text)
|
18 |
if 'choices' in data and len(data['choices']) > 0:
|
19 |
command = data['choices'][0]['text'].strip()
|