Rooni commited on
Commit
6783f03
·
1 Parent(s): aeab1ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -9,11 +9,8 @@ def send_command(description):
9
 
10
  response = requests.post(endpoint, headers={"Authorization": f"Bearer {api_key}"}, json={"queries": [query]})
11
 
12
- if response.status_code == 200:
13
  result = response.json()
14
  return result["choices"][0]["text"]
15
- else:
16
- return "Произошла ошибка при отправке запроса."
17
-
18
  iface = gr.Interface(fn=send_command, inputs="text", outputs="text", title="Minecraft Command Generator")
19
  iface.launch()
 
9
 
10
  response = requests.post(endpoint, headers={"Authorization": f"Bearer {api_key}"}, json={"queries": [query]})
11
 
 
12
  result = response.json()
13
  return result["choices"][0]["text"]
14
+
 
 
15
  iface = gr.Interface(fn=send_command, inputs="text", outputs="text", title="Minecraft Command Generator")
16
  iface.launch()