Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyaCoder committed Sep 25, 2024
1 parent 36fd155 commit d50e35f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ jobs:
name: rtvc-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.package-type }}
path: dist

publish:
needs: lint
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pdm-project/setup-pdm@v3
- name: Install dependencies
run: pdm sync
- name: Publish
run: pdm publish -u __token__ -P ${{ secrets.PYPI_TOKEN }}
# publish:
# needs: lint
# runs-on: ubuntu-latest
# if: startsWith(github.ref, 'refs/tags/v')
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: "3.10"
# - uses: pdm-project/setup-pdm@v3
# - name: Install dependencies
# run: pdm sync
# - name: Publish
# run: pdm publish -u __token__ -P ${{ secrets.PYPI_TOKEN }}
7 changes: 3 additions & 4 deletions fish/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,16 @@ def update_display(self):
self.input_edit.toPlainText().replace("\n", "<br>").replace(" ", "&nbsp;")
)

# 定义替换函数
def replace_emotion(match):
emotion = match.group(1) # 获取情绪标签
emotion = match.group(1)
if emotion in emotions:
data = emotions[emotion]
following_text = match.group(2) # 获取跟随的文本
following_text = match.group(2)
return (
f'<span style="background-color: {data["color"]}; color: black;">'
f'{data["emoji"]} {following_text}</span>'
)
return match.group(0) # 返回原始文本
return match.group(0) # return raw text

# 修改正则表达式,捕获后续文本
pattern = r"\[INST\](.*?)\[\/INST\](.*?)(?=\[INST\]|$|<br>)"
Expand Down

0 comments on commit d50e35f

Please sign in to comment.