Commit
·
9724286
1
Parent(s):
aedc796
added import gradio
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from tensorflow.keras.models import load_model
|
2 |
import numpy as np
|
3 |
import cv2
|
|
|
4 |
|
5 |
model = load_model('sentimentality.h5')
|
6 |
|
@@ -12,4 +13,4 @@ def sentiment(text):
|
|
12 |
|
13 |
input_text = gr.inputs.Textbox(label="Enter text here to be classified:")
|
14 |
label = gr.outputs.Label(num_top_classes=2)
|
15 |
-
gr.Interface(fn=predict_from_img, inputs=
|
|
|
1 |
from tensorflow.keras.models import load_model
|
2 |
import numpy as np
|
3 |
import cv2
|
4 |
+
import gradio as gr
|
5 |
|
6 |
model = load_model('sentimentality.h5')
|
7 |
|
|
|
13 |
|
14 |
input_text = gr.inputs.Textbox(label="Enter text here to be classified:")
|
15 |
label = gr.outputs.Label(num_top_classes=2)
|
16 |
+
gr.Interface(fn=predict_from_img, inputs=input_text, outputs=label,title = 'Sentiment-Analysis').launch()
|