DmitrMakeev commited on
Commit
78e633e
1 Parent(s): 3661cf2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,13 +2,15 @@ import openai
2
  import gradio as gr
3
  from gradio import HuggingFaceDatasetSaver
4
  api_k = 'sk'
5
- openai.api_key = api_k
6
 
7
 
8
  with gr.Blocks() as myface:
9
  with gr.Row():
10
  api_k = gr.Textbox(label="Ключ OpenAI API", type="password")
11
 
 
 
12
  def openai_chat(prompt):
13
  completions = openai.Completion.create(
14
  engine="text-davinci-003",
 
2
  import gradio as gr
3
  from gradio import HuggingFaceDatasetSaver
4
  api_k = 'sk'
5
+
6
 
7
 
8
  with gr.Blocks() as myface:
9
  with gr.Row():
10
  api_k = gr.Textbox(label="Ключ OpenAI API", type="password")
11
 
12
+ openai.api_key = api_k
13
+
14
  def openai_chat(prompt):
15
  completions = openai.Completion.create(
16
  engine="text-davinci-003",