Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
|
5 |
def generate_text(prompt, temperature):
|
6 |
generator = pipeline('text-generation', model='titleos/Seahorse-350m')
|
7 |
-
generated_text = generator(prompt, max_length=100, temperature=temperature)[0]['generated_text']
|
8 |
response = generated_text.split("### Response")[-1]
|
9 |
return response
|
10 |
|
|
|
4 |
|
5 |
def generate_text(prompt, temperature):
|
6 |
generator = pipeline('text-generation', model='titleos/Seahorse-350m')
|
7 |
+
generated_text = generator("### Instruction " + prompt + "/n ###Response ", max_length=100, temperature=temperature)[0]['generated_text']
|
8 |
response = generated_text.split("### Response")[-1]
|
9 |
return response
|
10 |
|