Spaces:
Sleeping
Sleeping
Update ContentGradio.py
Browse files- ContentGradio.py +16 -2
ContentGradio.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
|
|
|
|
|
4 |
# Function for Main content (takes user input and returns a response)
|
5 |
def process_input(user_input):
|
6 |
return f"You entered: {user_input}"
|
@@ -27,8 +29,19 @@ def get_example():
|
|
27 |
|
28 |
# Create the header section
|
29 |
def create_header():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
with gr.Row():
|
31 |
-
gr.Markdown("<div id='header'
|
32 |
|
33 |
# Create the user guidance section
|
34 |
def create_user_guidance():
|
@@ -60,7 +73,8 @@ def create_examples(user_input):
|
|
60 |
# Create the footer section
|
61 |
def create_footer():
|
62 |
with gr.Row():
|
63 |
-
gr.Markdown("<div id='footer'
|
|
|
64 |
|
65 |
# Main function to bring all sections together
|
66 |
def ContentAgentUI():
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
|
4 |
+
|
5 |
+
|
6 |
# Function for Main content (takes user input and returns a response)
|
7 |
def process_input(user_input):
|
8 |
return f"You entered: {user_input}"
|
|
|
29 |
|
30 |
# Create the header section
|
31 |
def create_header():
|
32 |
+
|
33 |
+
agent_header = """
|
34 |
+
# Content Agent
|
35 |
+
|
36 |
+
Use content agent to determine whether language is polite by passing it text strings.
|
37 |
+
|
38 |
+
Content Agent checks text and classifies it as polite, somewhat polite, neutral, and impolite.
|
39 |
+
Uses Intel's Polite Guard NLP library
|
40 |
+
|
41 |
+
|
42 |
+
"""
|
43 |
with gr.Row():
|
44 |
+
gr.Markdown(f"<div id='header'>$agent_header</div>")
|
45 |
|
46 |
# Create the user guidance section
|
47 |
def create_user_guidance():
|
|
|
73 |
# Create the footer section
|
74 |
def create_footer():
|
75 |
with gr.Row():
|
76 |
+
gr.Markdown("<div id='footer'>Thanks for trying it out!</div>")
|
77 |
+
|
78 |
|
79 |
# Main function to bring all sections together
|
80 |
def ContentAgentUI():
|