Spaces:
Sleeping
Sleeping
Update ui/contentagentui.py
Browse files- ui/contentagentui.py +9 -5
ui/contentagentui.py
CHANGED
|
@@ -40,18 +40,17 @@ class ContentAgentUI:
|
|
| 40 |
def _create_user_guidance(self):
|
| 41 |
|
| 42 |
gr.Markdown("""
|
| 43 |
-
|
| 44 |
- `polite`
|
| 45 |
- `somewhat polite`
|
| 46 |
- `neutral`
|
| 47 |
- `impolite`
|
| 48 |
|
| 49 |
-
|
| 50 |
-
- Scoring runs from O to 1
|
| 51 |
|
| 52 |
""")
|
| 53 |
|
| 54 |
-
|
| 55 |
gr.Markdown(f"""
|
| 56 |
Technology:
|
| 57 |
- App is running `{self.agent_type}` text generation model.
|
|
@@ -118,7 +117,12 @@ class ContentAgentUI:
|
|
| 118 |
|
| 119 |
# Optional: Adjust path if needed for hosted environments
|
| 120 |
css_path = os.path.join(os.getcwd(), "ui", "styles.css")
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
with gr.Blocks(css=css_path if os.path.exists(css_path) else None) as demo:
|
| 123 |
# global header (always visible)
|
| 124 |
gr.Markdown("# Content Agent")
|
|
|
|
| 40 |
def _create_user_guidance(self):
|
| 41 |
|
| 42 |
gr.Markdown("""
|
| 43 |
+
Enter text below to get started. Content Agent will try to determine whether the language is polite and uses the following classification:
|
| 44 |
- `polite`
|
| 45 |
- `somewhat polite`
|
| 46 |
- `neutral`
|
| 47 |
- `impolite`
|
| 48 |
|
| 49 |
+
The official model outputs categories, not a single “politeness score.” The 0–1 number is the confidence for a label (e.g., P(impolite) or P(polite)).
|
|
|
|
| 50 |
|
| 51 |
""")
|
| 52 |
|
| 53 |
+
gr.Markdown(" ")
|
| 54 |
gr.Markdown(f"""
|
| 55 |
Technology:
|
| 56 |
- App is running `{self.agent_type}` text generation model.
|
|
|
|
| 117 |
|
| 118 |
# Optional: Adjust path if needed for hosted environments
|
| 119 |
css_path = os.path.join(os.getcwd(), "ui", "styles.css")
|
| 120 |
+
print("adding css, does it exist?")
|
| 121 |
+
if ( os.path.exists(css_path)):
|
| 122 |
+
print("yea")
|
| 123 |
+
else
|
| 124 |
+
print("nope")
|
| 125 |
+
|
| 126 |
with gr.Blocks(css=css_path if os.path.exists(css_path) else None) as demo:
|
| 127 |
# global header (always visible)
|
| 128 |
gr.Markdown("# Content Agent")
|