Ahsen Khaliq commited on
Commit
1b1c078
1 Parent(s): dfb2a73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -20,14 +20,14 @@ io4 = gr.Interface.load("huggingface/gpt2-xl")
20
 
21
  def inference(text, model):
22
  if model == "gpt2-large":
23
- text = io2(inputs=gr.inputs.Textbox(lines=5, label="Input Text"))
24
  elif model == "gpt2-medium":
25
- text = io3(inputs=gr.inputs.Textbox(lines=5, label="Input Text"))
26
  elif model == "gpt2-xl":
27
- text = io4(inputs=gr.inputs.Textbox(lines=5, label="Input Text"))
28
  else:
29
- text = io1(inputs=gr.inputs.Textbox(lines=5, label="Input Text"))
30
- return text
31
 
32
 
33
 
 
20
 
21
  def inference(text, model):
22
  if model == "gpt2-large":
23
+ outtext = io2(text)
24
  elif model == "gpt2-medium":
25
+ outtext = io3(text)
26
  elif model == "gpt2-xl":
27
+ outtext = io4(text)
28
  else:
29
+ outtext = io1(text)
30
+ return outtext
31
 
32
 
33