Spaces:
Runtime error
Runtime error
Commit
·
e9ec0aa
1
Parent(s):
abba6e8
Changed length
Browse files
app.py
CHANGED
@@ -9,14 +9,14 @@ theme = gr.themes.Soft()
|
|
9 |
# Function that generates text based on instruction-based prompting
|
10 |
def generate_text(input_instruction):
|
11 |
# Use the input instruction to generate text
|
12 |
-
generated_text = pipe(input_instruction, max_length=
|
13 |
return generated_text
|
14 |
|
15 |
# Define example instructions for testing
|
16 |
instruction_examples = [
|
17 |
-
("
|
18 |
-
("Explain the concept of artificial intelligence
|
19 |
-
("
|
20 |
]
|
21 |
|
22 |
# Function that echoes the input text
|
|
|
9 |
# Function that generates text based on instruction-based prompting
|
10 |
def generate_text(input_instruction):
|
11 |
# Use the input instruction to generate text
|
12 |
+
generated_text = pipe(input_instruction, max_length=500)[0]['generated_text']
|
13 |
return generated_text
|
14 |
|
15 |
# Define example instructions for testing
|
16 |
instruction_examples = [
|
17 |
+
("Describe the origin of the universe"),
|
18 |
+
("Explain the concept of artificial intelligence"),
|
19 |
+
("Describe the most common types of cancer"),
|
20 |
]
|
21 |
|
22 |
# Function that echoes the input text
|