Farhan1572 commited on
Commit
e96495d
β€’
1 Parent(s): 4b19bc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -35,7 +35,17 @@ def get_response_from_text(
35
 
36
 
37
  def greet(context):
38
- return get_response_from_text(context)
 
 
 
 
 
 
 
 
 
 
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")