awinml commited on
Commit
89c4eda
1 Parent(s): 6033f1a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -33,7 +33,10 @@ def generate_text(prompt="Who is the CEO of Apple?"):
33
  stop=["#"],
34
  )
35
  output_text = output["choices"][0]["text"].strip()
36
- return output_text
 
 
 
37
 
38
 
39
  description = "Vicuna-7B"
 
33
  stop=["#"],
34
  )
35
  output_text = output["choices"][0]["text"].strip()
36
+
37
+ # Remove Prompt Echo from Generated Text
38
+ cleaned_output_text = output_text.replace(prompt, "")
39
+ return cleaned_output_text
40
 
41
 
42
  description = "Vicuna-7B"