From d50e35ff452d073564288fe443dfa649c3bdb751 Mon Sep 17 00:00:00 2001 From: AnyaCoder Date: Thu, 26 Sep 2024 00:34:05 +0800 Subject: [PATCH] Fix workflow --- .github/workflows/ci.yml | 28 ++++++++++++++-------------- fish/input.py | 7 +++---- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b75433d..47a4e0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/fish/input.py b/fish/input.py index 0269885..01f971c 100644 --- a/fish/input.py +++ b/fish/input.py @@ -147,17 +147,16 @@ def update_display(self): self.input_edit.toPlainText().replace("\n", "
").replace(" ", " ") ) - # 定义替换函数 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'' f'{data["emoji"]} {following_text}' ) - return match.group(0) # 返回原始文本 + return match.group(0) # return raw text # 修改正则表达式,捕获后续文本 pattern = r"\[INST\](.*?)\[\/INST\](.*?)(?=\[INST\]|$|
)"