Ahsen Khaliq commited on
Commit
ad69f75
1 Parent(s): 908b776

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -16,6 +16,8 @@ io2 = gr.Interface.load("huggingface/t5-small")
16
 
17
  io3 = gr.Interface.load("huggingface/t5-large")
18
 
 
 
19
 
20
 
21
  def inference(text, model):
@@ -23,15 +25,17 @@ def inference(text, model):
23
  outtext = io1(text)
24
  elif model == "t5-small":
25
  outtext = io2(text)
26
- else:
27
  outtext = io3(text)
 
 
28
  return outtext
29
 
30
 
31
 
32
  gr.Interface(
33
  inference,
34
- [gr.inputs.Textbox(label="Input"),gr.inputs.Dropdown(choices=["t5-base","t5-small","t5-large"], type="value", default="t5-base", label="model")
35
  ],
36
  gr.outputs.Textbox(label="Output"),
37
  examples=examples,
 
16
 
17
  io3 = gr.Interface.load("huggingface/t5-large")
18
 
19
+ io4 = gr.Interface.load("huggingface/t5-3b")
20
+
21
 
22
 
23
  def inference(text, model):
 
25
  outtext = io1(text)
26
  elif model == "t5-small":
27
  outtext = io2(text)
28
+ elif model == "t5-large":
29
  outtext = io3(text)
30
+ else:
31
+ outtext = io4(text)
32
  return outtext
33
 
34
 
35
 
36
  gr.Interface(
37
  inference,
38
+ [gr.inputs.Textbox(label="Input"),gr.inputs.Dropdown(choices=["t5-base","t5-small","t5-large","t5-3b"], type="value", default="t5-base", label="model")
39
  ],
40
  gr.outputs.Textbox(label="Output"),
41
  examples=examples,