kavansaun commited on
Commit
9b891e0
·
verified ·
1 Parent(s): 592121a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -6,7 +6,7 @@ from github import Github
6
  import uuid
7
 
8
  openai.api_key = os.getenv('OPENAI_KEY') # Initializing secrets
9
- token = os.getenv('GITHUB_KEY')
10
 
11
  with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}") as chatblock: # Creating UI using gradio Blocks. This line sets the block as a variable called "chatblock", the theme as monochrome, and removes the footer of the page.
12
  user_id = gr.Markdown(visible=False) # Displaying the user id, it is made not-visible because the id hasnt been created yet.
@@ -21,9 +21,6 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
21
  message_history.append({"role": "developer", "content": instructions}) # This line adds the instructions to the message history (as a developer) so it will always inhibit the instructions no matter what the user says.
22
 
23
  new_id = str(uuid.uuid4()) # Id created by uuid.
24
-
25
- # Add token and connect to repository
26
- g = Github(token)
27
 
28
  # Creating a new file with the user id to save the user responses and chat bot responses to the repository
29
  repo = g.get_user().get_repo("CATDATA")
 
6
  import uuid
7
 
8
  openai.api_key = os.getenv('OPENAI_KEY') # Initializing secrets
9
+ g = Github(os.getenv('GITHUB_KEY'))
10
 
11
  with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}") as chatblock: # Creating UI using gradio Blocks. This line sets the block as a variable called "chatblock", the theme as monochrome, and removes the footer of the page.
12
  user_id = gr.Markdown(visible=False) # Displaying the user id, it is made not-visible because the id hasnt been created yet.
 
21
  message_history.append({"role": "developer", "content": instructions}) # This line adds the instructions to the message history (as a developer) so it will always inhibit the instructions no matter what the user says.
22
 
23
  new_id = str(uuid.uuid4()) # Id created by uuid.
 
 
 
24
 
25
  # Creating a new file with the user id to save the user responses and chat bot responses to the repository
26
  repo = g.get_user().get_repo("CATDATA")