typesdigital commited on
Commit
b6c2498
·
1 Parent(s): ad3b0bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,6 +1,9 @@
1
  import gradio as gr
2
  import openai
3
 
 
 
 
4
  # Define a function that takes a user's input code as a prompt and uses the OpenAI API to generate a corrected version of the code
5
  def correct_code(prompt):
6
  # Use the OpenAI API to generate suggestions for fixing syntax errors in the code
 
1
  import gradio as gr
2
  import openai
3
 
4
+ # Set up the OpenAI API credentials
5
+ openai.api_key = "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"
6
+
7
  # Define a function that takes a user's input code as a prompt and uses the OpenAI API to generate a corrected version of the code
8
  def correct_code(prompt):
9
  # Use the OpenAI API to generate suggestions for fixing syntax errors in the code