tlkh commited on
Commit
cb39e31
·
1 Parent(s): c5328eb
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +5 -5
  2. app.py +5 -5
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -17,14 +17,14 @@ def infer(s1, s2):
17
 
18
  if "error" in data:
19
  return "Error: "+ data["error"]
 
 
20
  else:
21
  return data
22
 
23
- gr.Markdown("""
24
- # Paraphrase Classification and Explanation
25
-
26
- This is a Flan-T5-Large model fine-tuned to perform paraphrase classification and explanation
27
- """)
28
 
29
  demo = gr.Interface(fn=infer, inputs=["text", "text"], outputs="text")
30
 
 
17
 
18
  if "error" in data:
19
  return "Error: "+ data["error"]
20
+ elif "generated_text" in data:
21
+ return data["generated_text"]
22
  else:
23
  return data
24
 
25
+ title = "Paraphrase Classification and Explanation"
26
+ desc = "Classify and explain the semantic relationship between the two sentences"
27
+ long_desc = "This is a Flan-T5-Large model fine-tuned to perform paraphrase classification and explanation. It takes in two sentences as inputs."
 
 
28
 
29
  demo = gr.Interface(fn=infer, inputs=["text", "text"], outputs="text")
30
 
app.py CHANGED
@@ -17,14 +17,14 @@ def infer(s1, s2):
17
 
18
  if "error" in data:
19
  return "Error: "+ data["error"]
 
 
20
  else:
21
  return data
22
 
23
- gr.Markdown("""
24
- # Paraphrase Classification and Explanation
25
-
26
- This is a Flan-T5-Large model fine-tuned to perform paraphrase classification and explanation
27
- """)
28
 
29
  demo = gr.Interface(fn=infer, inputs=["text", "text"], outputs="text")
30
 
 
17
 
18
  if "error" in data:
19
  return "Error: "+ data["error"]
20
+ elif "generated_text" in data:
21
+ return data["generated_text"]
22
  else:
23
  return data
24
 
25
+ title = "Paraphrase Classification and Explanation"
26
+ desc = "Classify and explain the semantic relationship between the two sentences"
27
+ long_desc = "This is a Flan-T5-Large model fine-tuned to perform paraphrase classification and explanation. It takes in two sentences as inputs."
 
 
28
 
29
  demo = gr.Interface(fn=infer, inputs=["text", "text"], outputs="text")
30