Spaces:
Runtime error
Runtime error
Farhan1572
commited on
Commit
β’
e96495d
1
Parent(s):
4b19bc2
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,17 @@ def get_response_from_text(
|
|
35 |
|
36 |
|
37 |
def greet(context):
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
|
41 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text", title="Developed by Farhan Siddiqui")
|
|
|
35 |
|
36 |
|
37 |
def greet(context):
|
38 |
+
paragraphs = context.split("\n")
|
39 |
+
paraphrased_text = []
|
40 |
+
for paragraph in paragraphs:
|
41 |
+
try:
|
42 |
+
paraphrased_paragraph = get_response_from_text(paragraph)
|
43 |
+
paraphrased_text.append(paraphrased_paragraph)
|
44 |
+
except:
|
45 |
+
pass
|
46 |
+
|
47 |
+
response = ' '.join(paraphrased_text)
|
48 |
+
return response
|
49 |
|
50 |
|
51 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text", title="Developed by Farhan Siddiqui")
|