Update app.py
Browse files
app.py
CHANGED
@@ -221,76 +221,5 @@ def github_tool(
|
|
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 |
-
run_button.click(
|
273 |
-
github_tool,
|
274 |
-
inputs=[
|
275 |
-
action,
|
276 |
-
repo_name,
|
277 |
-
branch,
|
278 |
-
path,
|
279 |
-
content,
|
280 |
-
message,
|
281 |
-
owner,
|
282 |
-
vcs_url,
|
283 |
-
title,
|
284 |
-
body,
|
285 |
-
base,
|
286 |
-
head,
|
287 |
-
issue_number,
|
288 |
-
labels,
|
289 |
-
tag,
|
290 |
-
release_name, # Użycie zmienionej nazwy
|
291 |
-
],
|
292 |
-
outputs=output,
|
293 |
-
api_name="github_tool"
|
294 |
-
)
|
295 |
|
296 |
demo.launch()
|
|
|
221 |
return f"Błąd: {str(e)}"
|
222 |
|
223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
demo.launch()
|