Spaces:
Running
Running
Neopy
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def get_repo_info(repo_id):
|
|
37 |
print(f"Error fetching repo info: {e}")
|
38 |
return None, None
|
39 |
|
40 |
-
def generate_readme(repo_input
|
41 |
try:
|
42 |
# Validate and extract repo ID
|
43 |
repo_id = extract_repo_id(repo_input)
|
@@ -93,11 +93,6 @@ with gr.Blocks(title="HF Repo README Generator") as demo:
|
|
93 |
placeholder="Enter 'user/repo' or full URL...",
|
94 |
max_lines=1
|
95 |
)
|
96 |
-
api_key = gr.Textbox(
|
97 |
-
label="Groq API Key",
|
98 |
-
type="password",
|
99 |
-
placeholder="Enter your Groq API key..."
|
100 |
-
)
|
101 |
submit_btn = gr.Button("Generate README", variant="primary")
|
102 |
|
103 |
with gr.Row():
|
@@ -105,7 +100,7 @@ with gr.Blocks(title="HF Repo README Generator") as demo:
|
|
105 |
|
106 |
submit_btn.click(
|
107 |
fn=generate_readme,
|
108 |
-
inputs=
|
109 |
outputs=output
|
110 |
)
|
111 |
|
|
|
37 |
print(f"Error fetching repo info: {e}")
|
38 |
return None, None
|
39 |
|
40 |
+
def generate_readme(repo_input):
|
41 |
try:
|
42 |
# Validate and extract repo ID
|
43 |
repo_id = extract_repo_id(repo_input)
|
|
|
93 |
placeholder="Enter 'user/repo' or full URL...",
|
94 |
max_lines=1
|
95 |
)
|
|
|
|
|
|
|
|
|
|
|
96 |
submit_btn = gr.Button("Generate README", variant="primary")
|
97 |
|
98 |
with gr.Row():
|
|
|
100 |
|
101 |
submit_btn.click(
|
102 |
fn=generate_readme,
|
103 |
+
inputs=repo_input,
|
104 |
outputs=output
|
105 |
)
|
106 |
|