Spaces:
Build error
Build error
sandeepmajumdar
commited on
Commit
•
f53c39c
1
Parent(s):
92a38e3
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
def convert(prompt):
|
5 |
-
model = pipeline('text-generation', model='bigscience/bloom-
|
6 |
-
result = model(prompt, max_length=
|
7 |
return result[0]['generated_text']
|
8 |
|
9 |
with gr.Blocks() as bls:
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
def convert(prompt):
|
5 |
+
model = pipeline('text-generation', model='bigscience/bloom-560m')
|
6 |
+
result = model(prompt, max_length=400, num_beams = 2, num_beam_groups = 2, top_k=1, temperature=0.9, repetition_penalty = 2.0, diversity_penalty = 0.9)
|
7 |
return result[0]['generated_text']
|
8 |
|
9 |
with gr.Blocks() as bls:
|