File size: 613 Bytes
f92a51b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()