Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,8 @@ from fastai.text.all import *
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
model = load_learner("llmf.pkl")
|
| 5 |
-
def txt_gen(txt, n_words=
|
| 6 |
-
a = [model.predict(txt,n_words,temperature=0.
|
| 7 |
return "\n".join(a)
|
| 8 |
|
| 9 |
sents = gr.components.Textbox()
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
model = load_learner("llmf.pkl")
|
| 5 |
+
def txt_gen(txt, n_words=40, n_sents=2):
|
| 6 |
+
a = [model.predict(txt,n_words,temperature=0.9) for _ in range(n_sents)]
|
| 7 |
return "\n".join(a)
|
| 8 |
|
| 9 |
sents = gr.components.Textbox()
|