Merge pull request #4 from andreped/huggingface
Browse filesConfigured repo for Hugging Face Spaces deployment
- .github/workflows/deploy.yml +20 -0
- .github/workflows/filesize.yml +16 -0
- README.md +13 -0
- tests/test_plotly.py +2 -2
.github/workflows/deploy.yml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy
|
| 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://andreped:[email protected]/spaces/andreped/plotly main
|
.github/workflows/filesize.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Check file size
|
| 2 |
+
on:
|
| 3 |
+
pull_request:
|
| 4 |
+
branches: [ main ]
|
| 5 |
+
|
| 6 |
+
# to run this workflow manually from the Actions tab
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
check-filesize:
|
| 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
|
README.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Postly
|
| 2 |
|
| 3 |
This repository contain the Postly client, which serves as a micro-message communication platform, similar to Twitter.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: 'Postly: a simple twitter clone'
|
| 3 |
+
colorFrom: indigo
|
| 4 |
+
colorTo: indigo
|
| 5 |
+
sdk: streamlit
|
| 6 |
+
sdk_version: 1.13.0
|
| 7 |
+
app_port: 7860
|
| 8 |
+
emoji: 🫁
|
| 9 |
+
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
app_file: app.py
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
# Postly
|
| 15 |
|
| 16 |
This repository contain the Postly client, which serves as a micro-message communication platform, similar to Twitter.
|
tests/test_plotly.py
CHANGED
|
@@ -10,7 +10,7 @@ class TestPlotlyClient:
|
|
| 10 |
self.gt_topics = [["chilling"], ["steak"], ["steak"]]
|
| 11 |
|
| 12 |
# add toy data for testing
|
| 13 |
-
self.postly_instance.add_user("john")
|
| 14 |
for post in self.gt_posts:
|
| 15 |
self.postly_instance.add_post("john", post)
|
| 16 |
|
|
@@ -47,7 +47,7 @@ class TestPlotlyClient:
|
|
| 47 |
|
| 48 |
def test_delete_user(self):
|
| 49 |
temporary_postly_instance = PostlyClient()
|
| 50 |
-
temporary_postly_instance.add_user("simon")
|
| 51 |
temporary_postly_instance.add_post("simon", "just #coding today")
|
| 52 |
|
| 53 |
assert "simon" in temporary_postly_instance.userPosts
|
|
|
|
| 10 |
self.gt_topics = [["chilling"], ["steak"], ["steak"]]
|
| 11 |
|
| 12 |
# add toy data for testing
|
| 13 |
+
self.postly_instance.add_user("john", "password")
|
| 14 |
for post in self.gt_posts:
|
| 15 |
self.postly_instance.add_post("john", post)
|
| 16 |
|
|
|
|
| 47 |
|
| 48 |
def test_delete_user(self):
|
| 49 |
temporary_postly_instance = PostlyClient()
|
| 50 |
+
temporary_postly_instance.add_user("simon", "password")
|
| 51 |
temporary_postly_instance.add_post("simon", "just #coding today")
|
| 52 |
|
| 53 |
assert "simon" in temporary_postly_instance.userPosts
|