stevenkolawole commited on
Commit
5d5ce1d
Β·
1 Parent(s): 876e501

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -18,7 +18,7 @@ model = tf.saved_model.load(saved_model_path, ["serve"])
18
 
19
  title = "Interactive demo: T5 Multitasking Demo"
20
  description = "Demo for T5's different tasks including machine translation, \
21
- text summarization, document similarity, grammatical correctness of sentences"
22
 
23
 
24
  def predict_fn(x):
@@ -32,7 +32,7 @@ def predict_fn(x):
32
 
33
 
34
  def predict(task_type, sentence):
35
- """Function to parse the user inputs, run the parsed text through through the
36
  model and return output in a readable format.
37
  params:
38
  task_type sentence representing the type of task to run on T5 model
@@ -60,10 +60,10 @@ def predict(task_type, sentence):
60
 
61
  iface = gr.Interface(fn=predict,
62
  inputs=[gr.inputs.Radio(
63
- choices=["Text Summarization",
64
- "Translate English to French",
65
  "Translate English to German",
66
  "Translate English to Romanian",
 
67
  "Grammatical correctness of sentence",
68
  "Document Similarity Score (separate the 2 sentences with 3 dashes `---`)"],
69
  label="Task Type"
 
18
 
19
  title = "Interactive demo: T5 Multitasking Demo"
20
  description = "Demo for T5's different tasks including machine translation, \
21
+ text summarization, document similarity, and grammatical correctness of sentences."
22
 
23
 
24
  def predict_fn(x):
 
32
 
33
 
34
  def predict(task_type, sentence):
35
+ """Function to parse the user inputs, run the parsed text through the
36
  model and return output in a readable format.
37
  params:
38
  task_type sentence representing the type of task to run on T5 model
 
60
 
61
  iface = gr.Interface(fn=predict,
62
  inputs=[gr.inputs.Radio(
63
+ choices=["Translate English to French",
 
64
  "Translate English to German",
65
  "Translate English to Romanian",
66
+ "Text Summarization",
67
  "Grammatical correctness of sentence",
68
  "Document Similarity Score (separate the 2 sentences with 3 dashes `---`)"],
69
  label="Task Type"