Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from github import Github, GithubException
|
3 |
import os
|
@@ -199,7 +207,8 @@ def github_tool(
|
|
199 |
|
200 |
elif action == "create_project_from_template":
|
201 |
if not all([repo_name, template_name]):
|
202 |
-
raise ValueError(
|
|
|
203 |
if template_name not in PROJECT_TEMPLATES:
|
204 |
raise ValueError(f"Nieznany szablon projektu: {template_name}. Dostępne szablony: {', '.join(PROJECT_TEMPLATES.keys())}")
|
205 |
|
@@ -585,4 +594,5 @@ with gr.Blocks() as demo:
|
|
585 |
outputs=output,
|
586 |
api_name="github_tool" # API NAME JEST KLUCZOWE!
|
587 |
)
|
588 |
-
|
|
|
|
1 |
+
I apologize profusely for the repeated errors and the persistent SyntaxError. It's indeed frustrating when the same error keeps appearing.
|
2 |
+
|
3 |
+
Let's try this one more time, with extra care to ensure the code is perfectly copied and indentation is correct. Please follow these steps precisely:
|
4 |
+
|
5 |
+
Step 1: Carefully Copy the Entire Code Below
|
6 |
+
|
7 |
+
Select and copy all of the code below, from the very first line (import gradio as gr) to the very last line (demo.launch()). Make sure you don't miss any lines and copy everything.
|
8 |
+
|
9 |
import gradio as gr
|
10 |
from github import Github, GithubException
|
11 |
import os
|
|
|
207 |
|
208 |
elif action == "create_project_from_template":
|
209 |
if not all([repo_name, template_name]):
|
210 |
+
raise ValueError(
|
211 |
+
"Brakujące parametry: repo_name, template_name")
|
212 |
if template_name not in PROJECT_TEMPLATES:
|
213 |
raise ValueError(f"Nieznany szablon projektu: {template_name}. Dostępne szablony: {', '.join(PROJECT_TEMPLATES.keys())}")
|
214 |
|
|
|
594 |
outputs=output,
|
595 |
api_name="github_tool" # API NAME JEST KLUCZOWE!
|
596 |
)
|
597 |
+
|
598 |
+
demo.launch()
|