openlamm commited on
Commit
f05f5e8
·
1 Parent(s): a6b73ff

update parse text

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -78,6 +78,8 @@ def parse_text(text):
78
  line = line.replace("$", "$")
79
  lines[i] = "<br>"+line
80
  text = "".join(lines)
 
 
81
  return text
82
 
83
 
@@ -127,9 +129,6 @@ def predict(
127
  response = model.generate({
128
  'prompt': [prompt_text] if not isinstance(prompt_text, list) else prompt_text,
129
  'image_paths': [image_path] if image_path else [],
130
- # 'audio_paths': [audio_path] if audio_path else [],
131
- # 'video_paths': [video_path] if video_path else [],
132
- # 'thermal_paths': [thermal_path] if thermal_path else [],
133
  'top_p': top_p,
134
  'temperature': temperature,
135
  'max_tgt_len': max_length,
 
78
  line = line.replace("$", "&#36;")
79
  lines[i] = "<br>"+line
80
  text = "".join(lines)
81
+ if text.endswith("##"):
82
+ text = text[:-2]
83
  return text
84
 
85
 
 
129
  response = model.generate({
130
  'prompt': [prompt_text] if not isinstance(prompt_text, list) else prompt_text,
131
  'image_paths': [image_path] if image_path else [],
 
 
 
132
  'top_p': top_p,
133
  'temperature': temperature,
134
  'max_tgt_len': max_length,