Spaces:
Sleeping
Sleeping
Merge pull request #6 from devansh-srivastav/main
Browse filesRenamed to app.py, added metadata for spaces in readme and setup github actions to auto deploy on spaces
- .github/workflows/check.yml +16 -0
- .github/workflows/main.yml +20 -0
- README.md +7 -0
- EDxHuggingface.py → app.py +1 -1
.github/workflows/check.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Check file size
|
| 2 |
+
on: # or directly `on: [push]` to run the action on every push on any branch
|
| 3 |
+
pull_request:
|
| 4 |
+
branches: [main]
|
| 5 |
+
|
| 6 |
+
# to run this workflow manually from the Actions tab
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
sync-to-hub:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
steps:
|
| 13 |
+
- name: Check large files
|
| 14 |
+
uses: ActionsDesk/[email protected]
|
| 15 |
+
with:
|
| 16 |
+
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
|
.github/workflows/main.yml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Sync to Hugging Face hub
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: [main]
|
| 5 |
+
|
| 6 |
+
# to run this workflow manually from the Actions tab
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
sync-to-hub:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
steps:
|
| 13 |
+
- uses: actions/checkout@v3
|
| 14 |
+
with:
|
| 15 |
+
fetch-depth: 0
|
| 16 |
+
lfs: true
|
| 17 |
+
- name: Push to hub
|
| 18 |
+
env:
|
| 19 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 20 |
+
run: git push https://devanshsrivastav:[email protected]/spaces/devanshsrivastav/GoEmotions main
|
README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# GoEmotions Dashboard - Analyzing Emotions in Text
|
| 2 |
|
| 3 |
This is a Python script that uses Streamlit, Plotly, and the Hugging Face API to create a web-based dashboard for analyzing emotions in text.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
title: GoEmotions Dashboard
|
| 4 |
+
sdk: streamlit
|
| 5 |
+
sdk_version: "1.22.0"
|
| 6 |
+
app_file: app.py
|
| 7 |
+
---
|
| 8 |
# GoEmotions Dashboard - Analyzing Emotions in Text
|
| 9 |
|
| 10 |
This is a Python script that uses Streamlit, Plotly, and the Hugging Face API to create a web-based dashboard for analyzing emotions in text.
|
EDxHuggingface.py → app.py
RENAMED
|
@@ -62,7 +62,7 @@ color_map = {
|
|
| 62 |
|
| 63 |
|
| 64 |
# Labels for Hate Speech Classification
|
| 65 |
-
label_hs = {"LABEL_0": "Acceptable", "LABEL_1": "
|
| 66 |
|
| 67 |
# Define default options
|
| 68 |
|
|
|
|
| 62 |
|
| 63 |
|
| 64 |
# Labels for Hate Speech Classification
|
| 65 |
+
label_hs = {"LABEL_0": "Acceptable", "LABEL_1": "Inappropriate", "LABEL_2": "Offensive", "LABEL_3": "Violent"}
|
| 66 |
|
| 67 |
# Define default options
|
| 68 |
|