Spaces:
Sleeping
Sleeping
Aiswarya Sankar
commited on
Commit
·
f318492
1
Parent(s):
79013f3
Update the app
Browse files
app.py
CHANGED
@@ -81,7 +81,9 @@ global tickets
|
|
81 |
global ticket_choices
|
82 |
tickets = []
|
83 |
|
84 |
-
repoName = "https://github.com/gradio-app/gradio.git"
|
|
|
|
|
85 |
|
86 |
embeddings = OpenAIEmbeddings(disallowed_special=())
|
87 |
|
@@ -189,10 +191,6 @@ def index_repo(textbox: str, dropdown: str) -> Response:
|
|
189 |
repo = "/".join(repo[:-4].split("/")[-2:])
|
190 |
tickets = fetchGithubIssues(repo, 10)
|
191 |
|
192 |
-
# # Create the dropdown
|
193 |
-
# ticket_choices = {ticket["title"]: ticket for ticket in tickets}
|
194 |
-
# ticket_titles = [ticket["title"] for ticket in tickets]
|
195 |
-
|
196 |
return {
|
197 |
success_response: "SUCCESS",
|
198 |
launch_product: gr.update(visible=True)
|
@@ -327,7 +325,6 @@ def generateDocumentationPerFolder(dir, github):
|
|
327 |
an overview of that function.
|
328 |
""".format(dir, github)
|
329 |
|
330 |
-
# return prompt
|
331 |
try:
|
332 |
embeddings = OpenAIEmbeddings()
|
333 |
pathName = github.split('/')[-1]
|
@@ -379,7 +376,6 @@ def solveGithubIssue(ticket, history) -> Response:
|
|
379 |
Can you explain how to approach solving this ticket: {}. Here is a summary of the issue: {}
|
380 |
""".format(title, body)
|
381 |
|
382 |
-
|
383 |
try:
|
384 |
embeddings = OpenAIEmbeddings()
|
385 |
pathName = github.split('/')[-1]
|
@@ -532,12 +528,7 @@ with gr.Blocks() as demo:
|
|
532 |
msg = gr.Textbox()
|
533 |
clear = gr.Button("Clear")
|
534 |
|
535 |
-
# if index == 0:
|
536 |
-
# msg.submit(solveGithubIssue, [ticketDropdown, chatbot], [msg, chatbot], queue=False).then(
|
537 |
-
# bot, chatbot, chatbot
|
538 |
-
# )
|
539 |
ticketDropdown.change(solveGithubIssue, inputs=[ticketDropdown, chatbot], outputs=[chatbot])
|
540 |
-
# else:
|
541 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
542 |
bot, chatbot, chatbot
|
543 |
)
|
@@ -648,7 +639,9 @@ with gr.Blocks() as demo:
|
|
648 |
|
649 |
|
650 |
ingest_btn.click(fn=index_repo, inputs=[repoTextBox, ingestedRepos], outputs=[success_response, launch_product], api_name="index_repo")
|
|
|
|
|
|
|
651 |
|
652 |
demo.queue()
|
653 |
demo.launch(debug=True)
|
654 |
-
|
|
|
81 |
global ticket_choices
|
82 |
tickets = []
|
83 |
|
84 |
+
# repoName = "https://github.com/gradio-app/gradio.git"
|
85 |
+
repoName = os.environ['REPO_NAME']
|
86 |
+
print(repoName)
|
87 |
|
88 |
embeddings = OpenAIEmbeddings(disallowed_special=())
|
89 |
|
|
|
191 |
repo = "/".join(repo[:-4].split("/")[-2:])
|
192 |
tickets = fetchGithubIssues(repo, 10)
|
193 |
|
|
|
|
|
|
|
|
|
194 |
return {
|
195 |
success_response: "SUCCESS",
|
196 |
launch_product: gr.update(visible=True)
|
|
|
325 |
an overview of that function.
|
326 |
""".format(dir, github)
|
327 |
|
|
|
328 |
try:
|
329 |
embeddings = OpenAIEmbeddings()
|
330 |
pathName = github.split('/')[-1]
|
|
|
376 |
Can you explain how to approach solving this ticket: {}. Here is a summary of the issue: {}
|
377 |
""".format(title, body)
|
378 |
|
|
|
379 |
try:
|
380 |
embeddings = OpenAIEmbeddings()
|
381 |
pathName = github.split('/')[-1]
|
|
|
528 |
msg = gr.Textbox()
|
529 |
clear = gr.Button("Clear")
|
530 |
|
|
|
|
|
|
|
|
|
531 |
ticketDropdown.change(solveGithubIssue, inputs=[ticketDropdown, chatbot], outputs=[chatbot])
|
|
|
532 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
533 |
bot, chatbot, chatbot
|
534 |
)
|
|
|
639 |
|
640 |
|
641 |
ingest_btn.click(fn=index_repo, inputs=[repoTextBox, ingestedRepos], outputs=[success_response, launch_product], api_name="index_repo")
|
642 |
+
# ingest_btn.click(fn=)
|
643 |
+
|
644 |
+
|
645 |
|
646 |
demo.queue()
|
647 |
demo.launch(debug=True)
|
|