Spaces:
Sleeping
Sleeping
improve output format
Browse files
app.py
CHANGED
|
@@ -46,10 +46,14 @@ def run_model_with_frames(text):
|
|
| 46 |
frames = chunkText(text)
|
| 47 |
result = set()
|
| 48 |
for frame in frames:
|
| 49 |
-
|
| 50 |
-
for
|
| 51 |
-
result.add(
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
|
| 55 |
iface = gr.Interface(fn=run_model_with_frames, inputs="text", outputs="text")
|
|
|
|
| 46 |
frames = chunkText(text)
|
| 47 |
result = set()
|
| 48 |
for frame in frames:
|
| 49 |
+
questions = flatten(hf_run_model(frame))
|
| 50 |
+
for question in questions:
|
| 51 |
+
result.add(question.strip())
|
| 52 |
+
output_string = ""
|
| 53 |
+
for entry in result:
|
| 54 |
+
output_string += entry
|
| 55 |
+
output_string += "\n"
|
| 56 |
+
return output_string
|
| 57 |
|
| 58 |
|
| 59 |
iface = gr.Interface(fn=run_model_with_frames, inputs="text", outputs="text")
|