Spaces:
Sleeping
Sleeping
import gradio as gr | |
import requests | |
def send_command(cmd): | |
url = "https://copilot.github1s.tk/" | |
payload = { | |
"prompt": f'Напиши пожалуйста команду для Minecraft JAVA 1.20, под описание: "{cmd}"', | |
"api_key": "dummy" | |
} | |
response = requests.post(url, json=payload) | |
if response.status_code == 200: | |
return response.json() | |
else: | |
return "Не удалось отправить запрос или получить ответ." | |
iface = gr.Interface(send_command, "text", "text", title="Minecraft Команды") | |
iface.launch() | |