Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,10 +7,13 @@ def reviews_generator(text,n_words):
|
|
7 |
preds = learn.predict(text, n_words)
|
8 |
return outputs
|
9 |
|
10 |
-
examples = [["The beauty of this
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
7 |
preds = learn.predict(text, n_words)
|
8 |
return outputs
|
9 |
|
10 |
+
examples = [["The beauty of this book", "45"], ["I did not like this book because", "30"]]
|
11 |
|
12 |
+
gr.Interface(fn = reviews_generator,
|
13 |
+
title = "Book reviews generator",
|
14 |
+
description = "Type the beginning of a review, and the machine will generate a full review.",
|
15 |
+
inputs = [gr.Textbox(lines=1, placeholder="Enter the beginning of the review here", label="Starter text"),
|
16 |
+
gr.Slider(0, 100, label="Length of desired review")],
|
17 |
+
outputs = gr.outputs.Textbox(label="Generated Text"),
|
18 |
+
examples = examples
|
19 |
+
).launch(share=True)
|