Spaces:
Sleeping
Sleeping
fix bug
Browse files- .ipynb_checkpoints/app-checkpoint.py +6 -2
- app.py +6 -2
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -14,9 +14,13 @@ def query(payload):
|
|
14 |
def infer(s1, s2):
|
15 |
model_input = "Classify and explain the relationship between this pair of sentences: <S1> "+s1+" </S1><S2> "+s2+" </S2>"
|
16 |
data = query(model_input)
|
17 |
-
return data
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
20 |
# Paraphrase Classification and Explanation
|
21 |
|
22 |
This is a Flan-T5-Large model fine-tuned to perform paraphrase classification and explanation
|
|
|
14 |
def infer(s1, s2):
|
15 |
model_input = "Classify and explain the relationship between this pair of sentences: <S1> "+s1+" </S1><S2> "+s2+" </S2>"
|
16 |
data = query(model_input)
|
|
|
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
|
app.py
CHANGED
@@ -14,9 +14,13 @@ def query(payload):
|
|
14 |
def infer(s1, s2):
|
15 |
model_input = "Classify and explain the relationship between this pair of sentences: <S1> "+s1+" </S1><S2> "+s2+" </S2>"
|
16 |
data = query(model_input)
|
17 |
-
return data
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
20 |
# Paraphrase Classification and Explanation
|
21 |
|
22 |
This is a Flan-T5-Large model fine-tuned to perform paraphrase classification and explanation
|
|
|
14 |
def infer(s1, s2):
|
15 |
model_input = "Classify and explain the relationship between this pair of sentences: <S1> "+s1+" </S1><S2> "+s2+" </S2>"
|
16 |
data = query(model_input)
|
|
|
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
|