aichina commited on
Commit
71dc53b
1 Parent(s): 97c6b92
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -24,9 +24,11 @@ def create(prompt,openai_key):
24
  "frequency_penalty": 0.0,
25
  "presence_penalty": 0.0
26
  }
 
27
  url = 'https://api.openai.com/v1/completions'
28
  r = requests.post(url,headers=headers,
29
  data=json.dumps(data))
 
30
  return r.json()
31
 
32
 
@@ -90,7 +92,7 @@ with gr.Blocks() as demo:
90
 
91
  with gr.Row():
92
  url = gr.Textbox(placeholder='Youtube video URL', label='URL')
93
- openai_key = gr.Textbox(placeholder='Your openai key', label='key')
94
 
95
 
96
  with gr.Row():
 
24
  "frequency_penalty": 0.0,
25
  "presence_penalty": 0.0
26
  }
27
+ print(prompt,openai_key)
28
  url = 'https://api.openai.com/v1/completions'
29
  r = requests.post(url,headers=headers,
30
  data=json.dumps(data))
31
+ print(r.text)
32
  return r.json()
33
 
34
 
 
92
 
93
  with gr.Row():
94
  url = gr.Textbox(placeholder='Youtube video URL', label='URL')
95
+ openai_key = gr.Textbox(placeholder='Your openai key', label='OPENAI KEY')
96
 
97
 
98
  with gr.Row():