Update app.py
Browse files
app.py
CHANGED
@@ -221,9 +221,53 @@ def github_tool(
|
|
221 |
return f"Błąd: {str(e)}"
|
222 |
|
223 |
|
224 |
-
|
225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
|
227 |
-
demo = gr.Interface(fn=my_function, inputs=gr.Textbox(label="Nazwa repozytorium"), outputs="text")
|
228 |
|
229 |
demo.launch()
|
|
|
221 |
return f"Błąd: {str(e)}"
|
222 |
|
223 |
|
224 |
+
with gr.Blocks() as demo:
|
225 |
+
with gr.Row():
|
226 |
+
action = gr.Dropdown(
|
227 |
+
choices=[
|
228 |
+
"import_repository",
|
229 |
+
"create_repository",
|
230 |
+
"create_file",
|
231 |
+
"get_file",
|
232 |
+
"delete_file",
|
233 |
+
"update_file",
|
234 |
+
"list_branches",
|
235 |
+
"create_branch",
|
236 |
+
"delete_branch",
|
237 |
+
"create_pull_request",
|
238 |
+
"list_open_pull_requests",
|
239 |
+
"create_issue",
|
240 |
+
"list_issues",
|
241 |
+
"add_label_to_issue",
|
242 |
+
"close_issue",
|
243 |
+
"add_comment_to_issue",
|
244 |
+
"create_release",
|
245 |
+
"list_releases",
|
246 |
+
"fork_repository",
|
247 |
+
"list_forks",
|
248 |
+
"list_files",
|
249 |
+
],
|
250 |
+
label="Akcja",
|
251 |
+
)
|
252 |
+
repo_name = gr.Textbox(label="Nazwa repozytorium")
|
253 |
+
branch = gr.Textbox(label="Gałąź", value="main")
|
254 |
+
path = gr.Textbox(label="Ścieżka do pliku")
|
255 |
+
content = gr.Textbox(label="Zawartość pliku")
|
256 |
+
message = gr.Textbox(label="Wiadomość/Komentarz")
|
257 |
+
owner = gr.Textbox(label="Właściciel")
|
258 |
+
vcs_url = gr.Textbox(label="URL VCS")
|
259 |
+
title = gr.Textbox(label="Tytuł")
|
260 |
+
body = gr.Textbox(label="Treść")
|
261 |
+
base = gr.Textbox(label="Gałąź bazowa")
|
262 |
+
head = gr.Textbox(label="Gałąź docelowa/Nowa gałąź")
|
263 |
+
issue_number = gr.Number(label="Numer issue", precision=0)
|
264 |
+
labels = gr.Textbox(label="Etykiety (oddzielone przecinkami)")
|
265 |
+
tag = gr.Textbox(label="Tag")
|
266 |
+
release_name = gr.Textbox(label="Nazwa release") # Zmieniona nazwa
|
267 |
+
|
268 |
+
with gr.Row():
|
269 |
+
run_button = gr.Button("Wykonaj")
|
270 |
+
output = gr.Textbox(label="Wynik")
|
271 |
|
|
|
272 |
|
273 |
demo.launch()
|