Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 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"
|