Suguru1846 commited on
Commit
041b898
·
verified ·
1 Parent(s): 6a5e569

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -78,7 +78,7 @@ async def generate_text(request: GenerateRequest = None, prompt: str = None, max
78
  raw_response = tokenizer.decode(outputs[0], skip_special_tokens=True)
79
 
80
  clean_response = raw_response.replace(formatted_prompt, "").strip()
81
- clean_response = re.sub(r'</?s>|\[/?INST\]|\[/?INSR\]|\{/?INSST\}', '', clean_response).strip()
82
 
83
  return {"response": clean_response}
84
  except Exception as e:
 
78
  raw_response = tokenizer.decode(outputs[0], skip_special_tokens=True)
79
 
80
  clean_response = raw_response.replace(formatted_prompt, "").strip()
81
+ clean_response = re.sub(r'</?s>|\[/?s\]|\[/?INST\]|\[/?INSR\]|\{/?INSST\}', '', clean_response).strip()
82
 
83
  return {"response": clean_response}
84
  except Exception as e: