Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
generator = pipeline('text-generation', model='jslin09/bloom-560m-finetuned-fraud')
|
5 |
|
6 |
def generate(text):
|
7 |
-
result = generator(text, max_length=
|
8 |
return result[0]["generated_text"]
|
9 |
|
10 |
examples = [
|
@@ -14,8 +14,9 @@ examples = [
|
|
14 |
|
15 |
demo = gr.Interface(
|
16 |
fn=generate,
|
17 |
-
|
18 |
-
|
|
|
19 |
examples=examples
|
20 |
)
|
21 |
|
|
|
4 |
generator = pipeline('text-generation', model='jslin09/bloom-560m-finetuned-fraud')
|
5 |
|
6 |
def generate(text):
|
7 |
+
result = generator(text, max_length=400, num_return_sequences=1)
|
8 |
return result[0]["generated_text"]
|
9 |
|
10 |
examples = [
|
|
|
14 |
|
15 |
demo = gr.Interface(
|
16 |
fn=generate,
|
17 |
+
title="Drafting",
|
18 |
+
inputs=gr.inputs.Textbox(lines=5, label="輸入提示文字"),
|
19 |
+
outputs=gr.outputs.Textbox(label="生成的文本"),
|
20 |
examples=examples
|
21 |
)
|
22 |
|