Aiswarya Sankar commited on
Commit
e934710
·
1 Parent(s): a0382e7

Clean code

Browse files
Files changed (1) hide show
  1. app.py +39 -39
app.py CHANGED
@@ -526,45 +526,45 @@ with gr.Blocks() as demo:
526
  clear.click(lambda: None, None, chatbot, queue=False)
527
 
528
 
529
- with gr.Tab("AI Code Documentation"):
530
-
531
- repoName = repo_name.value
532
- # First parse through the folder structure and store that as a list of clickable buttons
533
- gr.Markdown("""
534
- ## AI Generated Code Documentation
535
- Code documentation comes in 3 flavors - internal engineering, external API documentation and product documentation. Each offers different layers of abstraction over the code base.
536
- """)
537
-
538
- # docs = generateDocumentationPerFolder("overview", repo_name)
539
-
540
- # For now let's just display all of the docs in one big file
541
- allDocs = ""
542
- dirNames = generateFolderNamesForRepo(repoName[:-4])
543
- for dir in dirNames:
544
- if dir[0] != ".":
545
- allDocs += generateDocumentationPerFolder(dir, repoName[:-4]) + '\n\n'
546
-
547
- gr.Markdown(allDocs)
548
-
549
- def button_click_callback(markdown):
550
- docs = generateDocumentationPerFolder("overview", repoName[:-4])
551
- markdown.update(docs)
552
-
553
- markdown = gr.Markdown()
554
- # Generate the left column buttons and their names and wrap each one in a function
555
- with gr.Row():
556
- with gr.Column(scale=.5, min_width=300):
557
- dirNames = generateFolderNamesForRepo(repoName[:-4])
558
- buttons = [gr.Button(folder_name) for folder_name in dirNames]
559
- for btn, folder_name in zip(buttons, dirNames):
560
- btn.click(button_click_callback, [markdown], [markdown] )
561
-
562
-
563
- # Generate the overall documentation for the main bubble at the same time
564
- with gr.Column(scale=2, min_width=300):
565
- docs = generateDocumentationPerFolder("overview", repoName[:-4])
566
- markdown.update(docs)
567
- # markdown.render()
568
 
569
 
570
  with gr.Tab("Custom Model Finetuning"):
 
526
  clear.click(lambda: None, None, chatbot, queue=False)
527
 
528
 
529
+ # with gr.Tab("AI Code Documentation"):
530
+
531
+ # repoName = repo_name.value
532
+ # # First parse through the folder structure and store that as a list of clickable buttons
533
+ # gr.Markdown("""
534
+ # ## AI Generated Code Documentation
535
+ # Code documentation comes in 3 flavors - internal engineering, external API documentation and product documentation. Each offers different layers of abstraction over the code base.
536
+ # """)
537
+
538
+ # # docs = generateDocumentationPerFolder("overview", repo_name)
539
+
540
+ # # For now let's just display all of the docs in one big file
541
+ # allDocs = ""
542
+ # dirNames = generateFolderNamesForRepo(repoName[:-4])
543
+ # for dir in dirNames:
544
+ # if dir[0] != ".":
545
+ # allDocs += generateDocumentationPerFolder(dir, repoName[:-4]) + '\n\n'
546
+
547
+ # gr.Markdown(allDocs)
548
+
549
+ # def button_click_callback(markdown):
550
+ # docs = generateDocumentationPerFolder("overview", repoName[:-4])
551
+ # markdown.update(docs)
552
+
553
+ # markdown = gr.Markdown()
554
+ # # Generate the left column buttons and their names and wrap each one in a function
555
+ # with gr.Row():
556
+ # with gr.Column(scale=.5, min_width=300):
557
+ # dirNames = generateFolderNamesForRepo(repoName[:-4])
558
+ # buttons = [gr.Button(folder_name) for folder_name in dirNames]
559
+ # for btn, folder_name in zip(buttons, dirNames):
560
+ # btn.click(button_click_callback, [markdown], [markdown] )
561
+
562
+
563
+ # # Generate the overall documentation for the main bubble at the same time
564
+ # with gr.Column(scale=2, min_width=300):
565
+ # docs = generateDocumentationPerFolder("overview", repoName[:-4])
566
+ # markdown.update(docs)
567
+ # # markdown.render()
568
 
569
 
570
  with gr.Tab("Custom Model Finetuning"):