Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import requests
|
|
3 |
import json
|
4 |
import os
|
5 |
|
6 |
-
def generate_minecraft_command(
|
7 |
headers = {
|
8 |
'Content-Type': 'application/json',
|
9 |
'Authorization': f'Bearer {os.getenv("API_KEY")}'
|
@@ -28,7 +28,7 @@ def generate_minecraft_command(description, minecraft_version="Minecraft Java 1.
|
|
28 |
return f'Не удалось сгенерировать команду. {data}'
|
29 |
|
30 |
iface = gr.Interface(fn=generate_minecraft_command, inputs=[
|
31 |
-
gr.Textbox(
|
32 |
-
"
|
33 |
], outputs="text", title="Minecraft Command Generator")
|
34 |
iface.launch()
|
|
|
3 |
import json
|
4 |
import os
|
5 |
|
6 |
+
def generate_minecraft_command(minecraft_version="Minecraft Java 1.20", description=""):
|
7 |
headers = {
|
8 |
'Content-Type': 'application/json',
|
9 |
'Authorization': f'Bearer {os.getenv("API_KEY")}'
|
|
|
28 |
return f'Не удалось сгенерировать команду. {data}'
|
29 |
|
30 |
iface = gr.Interface(fn=generate_minecraft_command, inputs=[
|
31 |
+
gr.Textbox(label="Версия Minecraft"),
|
32 |
+
gr.Textbox(label="Описание команды")
|
33 |
], outputs="text", title="Minecraft Command Generator")
|
34 |
iface.launch()
|