Spaces:
Sleeping
Sleeping
update app
Browse files
app.py
CHANGED
@@ -56,8 +56,7 @@ def generate_repo(url, api_key, model):
|
|
56 |
# print("Access to GPT-4 confirmed!")
|
57 |
# except:
|
58 |
# return "The API key either does not have access to GPT-4 or is not valid."
|
59 |
-
|
60 |
-
return readme_contents
|
61 |
else:
|
62 |
return "Please add a valid OpenAI API Key (you can get them [here](https://platform.openai.com/account/api-keys))"
|
63 |
|
@@ -86,11 +85,11 @@ with gr.Blocks(css=css_style) as demo:
|
|
86 |
url = gr.Textbox(label="GitHub Repository URL")
|
87 |
model = gr.Dropdown(["gpt-3.5-turbo", "gpt-4"], type="value", label='Model Type')
|
88 |
|
|
|
|
|
89 |
output_md = gr.Markdown()
|
90 |
output_text = gr.Text()
|
91 |
|
92 |
-
btn = gr.Button("Generate README.md")
|
93 |
-
|
94 |
def update_output(url, api_key, model):
|
95 |
content = generate_repo(url, api_key, model)
|
96 |
output_md.update(value=content)
|
|
|
56 |
# print("Access to GPT-4 confirmed!")
|
57 |
# except:
|
58 |
# return "The API key either does not have access to GPT-4 or is not valid."
|
59 |
+
return process_repository(url, model)
|
|
|
60 |
else:
|
61 |
return "Please add a valid OpenAI API Key (you can get them [here](https://platform.openai.com/account/api-keys))"
|
62 |
|
|
|
85 |
url = gr.Textbox(label="GitHub Repository URL")
|
86 |
model = gr.Dropdown(["gpt-3.5-turbo", "gpt-4"], type="value", label='Model Type')
|
87 |
|
88 |
+
btn = gr.Button("Generate README.md")
|
89 |
+
|
90 |
output_md = gr.Markdown()
|
91 |
output_text = gr.Text()
|
92 |
|
|
|
|
|
93 |
def update_output(url, api_key, model):
|
94 |
content = generate_repo(url, api_key, model)
|
95 |
output_md.update(value=content)
|