Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -103,7 +103,7 @@ except Exception as e:
|
|
| 103 |
df = pd.DataFrame({'content': ['test'], 'emoji': ['๐']})
|
| 104 |
|
| 105 |
# Mappings
|
| 106 |
-
sent_map = {'โค๏ธ':'
|
| 107 |
intent_map = {'โค๏ธ':'Emotion', '๐':'Agreement', '๐':'Emotion', '๐ฎ':'Surprise'}
|
| 108 |
|
| 109 |
# Vectorization
|
|
@@ -194,7 +194,7 @@ def get_predictions(text):
|
|
| 194 |
# --- 4. UI STYLING & INTERFACE ---
|
| 195 |
|
| 196 |
def get_avatar_url(seed):
|
| 197 |
-
return f"https://api.dicebear.com/7.x/bottts/svg?seed={seed}&backgroundColor=transparent"
|
| 198 |
|
| 199 |
CSS = """
|
| 200 |
.chat-window { font-family: 'Segoe UI', sans-serif; }
|
|
@@ -324,9 +324,9 @@ def chat_logic(message, history):
|
|
| 324 |
|
| 325 |
# --- 5. LAUNCH APP ---
|
| 326 |
|
| 327 |
-
with gr.Blocks(css=CSS, title="
|
| 328 |
-
gr.Markdown("### ๐ค
|
| 329 |
-
gr.Markdown("Type a message to see how
|
| 330 |
|
| 331 |
chatbot = gr.Chatbot(
|
| 332 |
elem_id="chat-window",
|
|
|
|
| 103 |
df = pd.DataFrame({'content': ['test'], 'emoji': ['๐']})
|
| 104 |
|
| 105 |
# Mappings
|
| 106 |
+
sent_map = {'โค๏ธ':'Positive', '๐':'Positive', '๐':'Positive', '๐ฏ':'Positive', '๐ข':'Negative', '๐ญ':'Negative', '๐ฎ':'Neutral'}
|
| 107 |
intent_map = {'โค๏ธ':'Emotion', '๐':'Agreement', '๐':'Emotion', '๐ฎ':'Surprise'}
|
| 108 |
|
| 109 |
# Vectorization
|
|
|
|
| 194 |
# --- 4. UI STYLING & INTERFACE ---
|
| 195 |
|
| 196 |
def get_avatar_url(seed):
|
| 197 |
+
return f"https://api.dicebear.com/7.x/bottts/svg?seed={seed}&backgroundColor=transparent&size=128"
|
| 198 |
|
| 199 |
CSS = """
|
| 200 |
.chat-window { font-family: 'Segoe UI', sans-serif; }
|
|
|
|
| 324 |
|
| 325 |
# --- 5. LAUNCH APP ---
|
| 326 |
|
| 327 |
+
with gr.Blocks(css=CSS, title="SentiChat") as demo:
|
| 328 |
+
gr.Markdown("### ๐ค Message Analysis")
|
| 329 |
+
gr.Markdown("Type a message to see how different AI/ML architectures interpret it.")
|
| 330 |
|
| 331 |
chatbot = gr.Chatbot(
|
| 332 |
elem_id="chat-window",
|