Danil commited on
Commit
73e6913
·
1 Parent(s): 2525f21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -7,11 +7,7 @@ openai.api_key = os.environ["api_key"]
7
  engine = os.environ["engine"]
8
 
9
 
10
- def happytt(temperature,max_tokens,text,stop):
11
- if stop == '':
12
- stop = []
13
- else:
14
- stop = [stop]
15
  response = openai.Completion.create(
16
  engine=engine,
17
  prompt=text,
@@ -43,7 +39,5 @@ https://beta.openai.com/examples?category=code'''
43
 
44
  iface = gr.Interface( happytt,[ gr.inputs.Slider(0, 1, step=0.1),gr.inputs.Slider(150, 4000, step=1),
45
  gr.inputs.Textbox(type='str',
46
- label="input prompt"),
47
- gr.inputs.Textbox(type='str',
48
- label='token that indicate the end of the generation')],"text", title = title, description = description )
49
  iface.launch(debug=True)
 
7
  engine = os.environ["engine"]
8
 
9
 
10
+ def happytt(temperature,max_tokens,text):
 
 
 
 
11
  response = openai.Completion.create(
12
  engine=engine,
13
  prompt=text,
 
39
 
40
  iface = gr.Interface( happytt,[ gr.inputs.Slider(0, 1, step=0.1),gr.inputs.Slider(150, 4000, step=1),
41
  gr.inputs.Textbox(type='str',
42
+ label="input prompt")],"text", title = title, description = description )
 
 
43
  iface.launch(debug=True)