Michelvh commited on
Commit
9182f58
·
1 Parent(s): 13305fa

improve output format

Browse files
Files changed (1) hide show
  1. app.py +8 -4
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
- answers = flatten(hf_run_model(frame))
50
- for answer in answers:
51
- result.add(answer.strip())
52
- return result
 
 
 
 
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")