Spaces:
Runtime error
Runtime error
Commit
·
76b80a6
1
Parent(s):
cf665c9
Added app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,15 @@ pipeline = transformers.pipeline(
|
|
16 |
|
17 |
def debate_response(text):
|
18 |
return "testing"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
|
21 |
intf = gr.Interface(fn=debate_response, inputs=gr.Textbox(), outputs="text")
|
|
|
16 |
|
17 |
def debate_response(text):
|
18 |
return "testing"
|
19 |
+
sequences = pipeline(
|
20 |
+
text,
|
21 |
+
do_sample=True,
|
22 |
+
top_k=10,
|
23 |
+
num_return_sequences=1,
|
24 |
+
eos_token_id=tokenizer.eos_token_id,
|
25 |
+
max_length=500,
|
26 |
+
)
|
27 |
+
return sequences[0]['generated_text']
|
28 |
|
29 |
|
30 |
intf = gr.Interface(fn=debate_response, inputs=gr.Textbox(), outputs="text")
|