Spaces:
Sleeping
Sleeping
testing pushing to HF
Browse files
.github/workflows/deploy.yml
CHANGED
|
@@ -5,7 +5,7 @@ name: Deploy to GitHub Pages
|
|
| 5 |
# push:
|
| 6 |
# branches:
|
| 7 |
# - main
|
| 8 |
-
on: push
|
| 9 |
|
| 10 |
permissions:
|
| 11 |
contents: write
|
|
|
|
| 5 |
# push:
|
| 6 |
# branches:
|
| 7 |
# - main
|
| 8 |
+
#on: push
|
| 9 |
|
| 10 |
permissions:
|
| 11 |
contents: write
|
.github/workflows/push_to_hf.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Push to Hugging Face
|
| 2 |
+
|
| 3 |
+
on: push
|
| 4 |
+
|
| 5 |
+
jobs:
|
| 6 |
+
deploy:
|
| 7 |
+
runs-on: ubuntu-latest
|
| 8 |
+
|
| 9 |
+
steps:
|
| 10 |
+
- name: Checkout Repository
|
| 11 |
+
uses: actions/checkout@v2
|
| 12 |
+
|
| 13 |
+
- name: Configure Git
|
| 14 |
+
run: |
|
| 15 |
+
git config --global user.email "dinis.cruz@owasp.org"
|
| 16 |
+
git config --global user.name "Dinis Cruz"
|
| 17 |
+
|
| 18 |
+
- name: Push to Hugging Face Repository
|
| 19 |
+
run: |
|
| 20 |
+
git remote add huggingface https://${{ secrets.HF_TOKEN }}@huggingface.co/the-cbr/test-athena.git
|
| 21 |
+
git push huggingface main # replace "main" with your branch if different
|
cbr_athena/api/Chat_Predict.py
CHANGED
|
@@ -29,7 +29,7 @@ class Chat_Predict:
|
|
| 29 |
history_openai_format.append({"role": "assistant", "content": assistant})
|
| 30 |
history_openai_format.append({"role": "user", "content": message})
|
| 31 |
|
| 32 |
-
pprint(history_openai_format)
|
| 33 |
response = openai.ChatCompletion.create(
|
| 34 |
model='gpt-3.5-turbo',
|
| 35 |
messages=history_openai_format,
|
|
|
|
| 29 |
history_openai_format.append({"role": "assistant", "content": assistant})
|
| 30 |
history_openai_format.append({"role": "user", "content": message})
|
| 31 |
|
| 32 |
+
#pprint(history_openai_format)
|
| 33 |
response = openai.ChatCompletion.create(
|
| 34 |
model='gpt-3.5-turbo',
|
| 35 |
messages=history_openai_format,
|
tests/test_Chat_Predict.py
CHANGED
|
@@ -6,7 +6,7 @@ from osbot_utils.utils.Files import file_exists, file_contents
|
|
| 6 |
from osbot_utils.utils.Misc import list_set
|
| 7 |
|
| 8 |
from cbr_athena.api.Chat_Predict import Chat_Predict
|
| 9 |
-
|
| 10 |
|
| 11 |
class test_Chat_Predict(TestCase):
|
| 12 |
|
|
|
|
| 6 |
from osbot_utils.utils.Misc import list_set
|
| 7 |
|
| 8 |
from cbr_athena.api.Chat_Predict import Chat_Predict
|
| 9 |
+
|
| 10 |
|
| 11 |
class test_Chat_Predict(TestCase):
|
| 12 |
|