Spaces:
Runtime error
Runtime error
Commit
Β·
3ab0fd6
1
Parent(s):
6e8442c
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,10 +21,11 @@ generate_text = InstructionTextGenerationPipeline(model=model, tokenizer=tokeniz
|
|
| 21 |
|
| 22 |
def generate(instruction):
|
| 23 |
response = generate_text(instruction)
|
| 24 |
-
result = ""
|
| 25 |
-
for word in response.split(" "):
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 28 |
|
| 29 |
examples = [
|
| 30 |
"Instead of making a peanut butter and jelly sandwich, what else could I combine peanut butter with in a sandwich? Give five ideas",
|
|
|
|
| 21 |
|
| 22 |
def generate(instruction):
|
| 23 |
response = generate_text(instruction)
|
| 24 |
+
# result = ""
|
| 25 |
+
# for word in response.split(" "):
|
| 26 |
+
# result += word + " "
|
| 27 |
+
# yield result
|
| 28 |
+
return response
|
| 29 |
|
| 30 |
examples = [
|
| 31 |
"Instead of making a peanut butter and jelly sandwich, what else could I combine peanut butter with in a sandwich? Give five ideas",
|