Commit ·
7023483
1
Parent(s): 6bb60f1
Update app.py
Browse files
app.py
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
def generate_emotion(sentences):
|
| 6 |
+
result = "happy"
|
| 7 |
+
return result
|
| 8 |
+
|
| 9 |
+
inputs=gr.Textbox(lines=5, label="Sentences",elem_id="inp_div")
|
| 10 |
+
outputs=gr.Textbox(lines=5, label="Here is the Result",elem_id="inp_div")
|
| 11 |
+
|
| 12 |
+
demo = gr.Interface(
|
| 13 |
+
generate_emotion,
|
| 14 |
+
inputs,
|
| 15 |
+
outputs,
|
| 16 |
+
title="Emotion Detection",
|
| 17 |
+
description="Feel free to give your feedback",
|
| 18 |
+
css=".gradio-container {background-color: lightgray} #inp_div {background-color: [#7](https://www1.example.com/issues/7)FB3D5;"
|
| 19 |
+
)
|
| 20 |
+
demo.launch()
|