Spaces:
Sleeping
Sleeping
Creat app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastai.text.all import *
|
| 2 |
+
import gradio as gr
|
| 3 |
+
learn = load_learner('imdb10epoch.pth')
|
| 4 |
+
def predict(text): return learn.predict(text, n_words=30)
|
| 5 |
+
intr = gr.Interface(predict, "text", "text")
|
| 6 |
+
intr.launch(inline =False)
|