Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -48,10 +48,14 @@ def infer(image_input):
|
|
48 |
|
49 |
result = get_text_after_colon(result)
|
50 |
|
51 |
-
#
|
52 |
-
|
|
|
|
|
|
|
|
|
53 |
|
54 |
-
return
|
55 |
|
56 |
css="""
|
57 |
#col-container {max-width: 910px; margin-left: auto; margin-right: auto;}
|
|
|
48 |
|
49 |
result = get_text_after_colon(result)
|
50 |
|
51 |
+
# Split the text into paragraphs based on new lines
|
52 |
+
paragraphs = result.split('\n\n')
|
53 |
+
|
54 |
+
# Join the paragraphs back with an extra empty line between each paragraph
|
55 |
+
formatted_text = '\n\n'.join(paragraphs)
|
56 |
+
|
57 |
|
58 |
+
return formatted_text, gr.Group.update(visible=True)
|
59 |
|
60 |
css="""
|
61 |
#col-container {max-width: 910px; margin-left: auto; margin-right: auto;}
|