Skip to content

Commit 9a65f38

Browse files
committed
testing GitHub HuggingFace sync
1 parent af5eacd commit 9a65f38

File tree

4 files changed

+278
-2
lines changed

4 files changed

+278
-2
lines changed

.github/workflows/sync-to-hf.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Sync to Hugging Face hub
2+
on:
3+
push:
4+
branches: [main]
5+
workflow_dispatch:
6+
7+
jobs:
8+
sync-to-hub:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
lfs: true
15+
16+
- name: Push to hub
17+
env:
18+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
19+
run: |
20+
git push https://MMADS:$HF_TOKEN@huggingface.co/spaces/MoralFoundationsClassifier-app/MoralFoundationsClassifier-app main

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,39 @@
1-
# MoralFoundationsClassifier-app
2-
Sync repo for HuggingFace app
1+
---
2+
title: Moral Foundations Classifier App
3+
emoji: 🤗 🧭
4+
colorFrom: blue
5+
colorTo: green
6+
sdk: gradio
7+
sdk_version: 4.19.2
8+
app_file: app.py
9+
pinned: false
10+
license: gpl-3.0
11+
---
12+
13+
# Moral Foundations Classifier App
14+
15+
A Gradio-based web application for analyzing moral foundations in text using the [MoralFoundationsClassifier](https://huggingface.co/MMADS/MoralFoundationsClassifier) model.
16+
17+
## Features
18+
19+
- Single text analysis with instant results
20+
- Batch processing of CSV files
21+
- Interactive visualizations of moral foundation scores
22+
- Cached model loading for better performance
23+
- Example texts for quick testing
24+
25+
## Usage
26+
27+
1. **Single Text Analysis**: Enter or paste text in the first tab and click "Analyze Text"
28+
2. **Batch Analysis**: Upload a CSV file with a 'text' column in the second tab
29+
30+
## About Moral Foundations Theory
31+
32+
The app analyzes text for five moral foundations:
33+
- Care/Harm
34+
- Fairness/Cheating
35+
- Loyalty/Betrayal
36+
- Authority/Subversion
37+
- Sanctity/Degradation
38+
39+
Each foundation has both virtue (positive) and vice (negative) dimensions.

0 commit comments

Comments
 (0)