Spaces:
Sleeping
Sleeping
Commit
·
8287cb2
1
Parent(s):
384edc4
workflow fixed
Browse files- .github/workflows/hugging-face.yaml +14 -13
- .github/workflows/unit-test.yaml +4 -6
- README.md +11 -1
- tests/test_datasets.py +2 -2
- tests/test_demo.py +0 -19
- tests/test_pretrained.py +2 -2
- tests/test_tokenizer.py +3 -3
- tests/test_transformer.py +2 -2
.github/workflows/hugging-face.yaml
CHANGED
@@ -1,19 +1,20 @@
|
|
1 |
-
name:
|
2 |
-
|
3 |
on:
|
4 |
push:
|
5 |
-
branches:
|
6 |
-
|
7 |
-
|
8 |
jobs:
|
9 |
-
|
10 |
runs-on: ubuntu-latest
|
11 |
-
|
12 |
steps:
|
13 |
-
-
|
14 |
-
uses: actions/checkout@v2
|
15 |
-
|
16 |
-
- name: Setup Python
|
17 |
-
uses: actions/setup-python@v2
|
18 |
with:
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Uploading on Huggingface
|
|
|
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 |
+
- name: Push to hub
|
16 |
+
env:
|
17 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
18 |
+
HF_USERNAME: zaibutcooler
|
19 |
+
SPACE_NAME: yume
|
20 |
+
run: git push https://${{ secrets.HF_USERNAME }}:$HF_TOKEN@huggingface.co/spaces/${{ secrets.HF_USERNAME }}/${{ secrets.SPACE_NAME }} main
|
.github/workflows/unit-test.yaml
CHANGED
@@ -10,18 +10,16 @@ jobs:
|
|
10 |
runs-on: ubuntu-latest
|
11 |
|
12 |
steps:
|
13 |
-
- name: Checkout
|
14 |
uses: actions/checkout@v2
|
15 |
|
16 |
-
- name:
|
17 |
uses: actions/setup-python@v2
|
18 |
with:
|
19 |
python-version: 3.x
|
20 |
|
21 |
- name: Install dependencies
|
22 |
-
run:
|
23 |
-
pip install -r ./requirements.txt
|
24 |
|
25 |
- name: Run tests
|
26 |
-
run:
|
27 |
-
python -m unittest ./tests
|
|
|
10 |
runs-on: ubuntu-latest
|
11 |
|
12 |
steps:
|
13 |
+
- name: Checkout repository
|
14 |
uses: actions/checkout@v2
|
15 |
|
16 |
+
- name: Set up Python
|
17 |
uses: actions/setup-python@v2
|
18 |
with:
|
19 |
python-version: 3.x
|
20 |
|
21 |
- name: Install dependencies
|
22 |
+
run: pip install -r requirements.txt
|
|
|
23 |
|
24 |
- name: Run tests
|
25 |
+
run: python -m unittest discover tests
|
|
README.md
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Yume: Image Generation with Diffusion model using PyTorch
|
2 |
|
3 |
## Overview
|
@@ -68,5 +78,5 @@ Mention any contributors or libraries that you used or were inspired by.
|
|
68 |
## Contact
|
69 |
|
70 |
- Zai
|
71 |
-
- zaiyellyintaung@gmail.com
|
72 |
- Project Link: [https://github.com/zaibutcooler/yume](https://github.com/zaibutcooler/yume)
|
|
|
1 |
+
---
|
2 |
+
title: {{title}}
|
3 |
+
emoji: {{emoji}}
|
4 |
+
colorFrom: {{colorFrom}}
|
5 |
+
colorTo: {{colorTo}}
|
6 |
+
sdk: {{sdk}}
|
7 |
+
sdk_version: {{sdkVersion}}
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
# Yume: Image Generation with Diffusion model using PyTorch
|
12 |
|
13 |
## Overview
|
|
|
78 |
## Contact
|
79 |
|
80 |
- Zai
|
81 |
+
- <zaiyellyintaung@gmail.com>
|
82 |
- Project Link: [https://github.com/zaibutcooler/yume](https://github.com/zaibutcooler/yume)
|
tests/test_datasets.py
CHANGED
@@ -2,10 +2,10 @@ import unittest
|
|
2 |
|
3 |
|
4 |
class TestDatasets(unittest.TestCase):
|
5 |
-
def test_download():
|
6 |
pass
|
7 |
|
8 |
-
def test_encode():
|
9 |
pass
|
10 |
|
11 |
|
|
|
2 |
|
3 |
|
4 |
class TestDatasets(unittest.TestCase):
|
5 |
+
def test_download(self):
|
6 |
pass
|
7 |
|
8 |
+
def test_encode(self):
|
9 |
pass
|
10 |
|
11 |
|
tests/test_demo.py
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
# test_demo.py
|
2 |
-
import unittest
|
3 |
-
|
4 |
-
|
5 |
-
class TestDemoFunctions(unittest.TestCase):
|
6 |
-
|
7 |
-
def test_add_numbers(self):
|
8 |
-
self.assertEqual(add_numbers(2, 3), 5)
|
9 |
-
self.assertEqual(add_numbers(-1, 1), 0)
|
10 |
-
# Add more test cases as needed
|
11 |
-
|
12 |
-
def test_multiply_numbers(self):
|
13 |
-
self.assertEqual(multiply_numbers(2, 3), 6)
|
14 |
-
self.assertEqual(multiply_numbers(-1, 1), -1)
|
15 |
-
# Add more test cases as needed
|
16 |
-
|
17 |
-
|
18 |
-
if __name__ == "__main__":
|
19 |
-
unittest.main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/test_pretrained.py
CHANGED
@@ -2,10 +2,10 @@ import unittest
|
|
2 |
|
3 |
|
4 |
class TestPretrained(unittest.TestCase):
|
5 |
-
def test_download():
|
6 |
pass
|
7 |
|
8 |
-
def test_generation():
|
9 |
pass
|
10 |
|
11 |
|
|
|
2 |
|
3 |
|
4 |
class TestPretrained(unittest.TestCase):
|
5 |
+
def test_download(self):
|
6 |
pass
|
7 |
|
8 |
+
def test_generation(self):
|
9 |
pass
|
10 |
|
11 |
|
tests/test_tokenizer.py
CHANGED
@@ -2,13 +2,13 @@ import unittest
|
|
2 |
|
3 |
|
4 |
class TestTokenizer(unittest.TestCase):
|
5 |
-
def test_encode():
|
6 |
pass
|
7 |
|
8 |
-
def test_decode():
|
9 |
pass
|
10 |
|
11 |
-
def test_equal_result():
|
12 |
pass
|
13 |
|
14 |
|
|
|
2 |
|
3 |
|
4 |
class TestTokenizer(unittest.TestCase):
|
5 |
+
def test_encode(self):
|
6 |
pass
|
7 |
|
8 |
+
def test_decode(self):
|
9 |
pass
|
10 |
|
11 |
+
def test_equal_result(self):
|
12 |
pass
|
13 |
|
14 |
|
tests/test_transformer.py
CHANGED
@@ -2,10 +2,10 @@ import unittest
|
|
2 |
|
3 |
|
4 |
class TestTransformer(unittest.TestCase):
|
5 |
-
def test_loading_model():
|
6 |
pass
|
7 |
|
8 |
-
def test_parameters():
|
9 |
pass
|
10 |
|
11 |
|
|
|
2 |
|
3 |
|
4 |
class TestTransformer(unittest.TestCase):
|
5 |
+
def test_loading_model(self):
|
6 |
pass
|
7 |
|
8 |
+
def test_parameters(self):
|
9 |
pass
|
10 |
|
11 |
|