Skip to content

Commit

Permalink
refactor: docs resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Col0ring committed Feb 28, 2024
1 parent a622c6b commit faf3edc
Show file tree
Hide file tree
Showing 29 changed files with 24 additions and 47 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ max-line-length = 9999
avoid-escape = no
ignore =
E121
E126
E131
F401
F403
Expand Down
2 changes: 1 addition & 1 deletion README-ja_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ demo.queue().launch()
- Chatbot: gradio チャットボット拡張コンポーネントは、マルチモーダルコンテンツ出力、マルチボットシナリオ、会話コンテンツ内のカスタムレンダリングコンポーネントやイベントインタラクションをサポートします。
- MultimodalInput: ファイルアップロード、録画、写真撮影などの機能をサポートするマルチモーダル入力ボックス。
- Markdown: gradio Markdown 拡張コンポーネントは、マルチモーダルコンテンツ(オーディオ、ビデオ、音声、ファイル、テキスト)の出力をサポートします。
- ImageGallery (WIP): gradio Gallery 拡張コンポーネントは、ウォーターフォール形式の画像表示をサポートします。
- WaterfallGallery (WIP): gradio Gallery 拡張コンポーネントは、ウォーターフォール形式の画像表示をサポートします。
- その他のコンポーネント...

詳しい使い方は[ドキュメントと例](https://modelscope.cn/studios/modelscope/modelscope-studio/summary)を参照して下さい
Expand Down
2 changes: 1 addition & 1 deletion README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ demo.queue().launch()
- Chatbot: gradio Chatbot 扩展组件,支持输出多模态内容、支持多 bot 场景、支持对话内容内的自定义渲染组件及事件交互。
- MultimodalInput: 多模态输入框,支持上传文件、录音、照相等功能。
- Markdown: gradio Markdown 扩展组件,支持输出多模态内容(音频、视频、语音、文件、文本)。
- ImageGallery(WIP): gradio Gallery 扩展组件,支持瀑布流的图像展示。
- WaterfallGallery(WIP): gradio Gallery 扩展组件,支持瀑布流的图像展示。
- 更多组件...

详细使用参见 [文档与示例](https://modelscope.cn/studios/modelscope/modelscope-studio/summary)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The currently supported components include:
- Chatbot: gradio Chatbot extension component, supports multi-modal content output, multi-bot scenarios, and custom rendering components and event interactions within the conversation content.
- MultimodalInput: A multi-modal input box, supporting functions such as file upload, recording, and photography.
- Markdown: gradio Markdown extension component, supports the output of multi-modal content (audio, video, voice, files, text).
- ImageGallery (WIP): gradio Gallery extension component, supports waterfall-style image display.
- WaterfallGallery (WIP): gradio Gallery extension component, supports waterfall-style image display.
- More components...

For detailed usage, see [Documentation and Examples](https://modelscope.cn/studios/modelscope/modelscope-studio/summary)
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Chatbot/demos/accordion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def resolve_assets(relative_path):
return os.path.join(os.path.dirname(__file__), "../resources",
return os.path.join(os.path.dirname(__file__), "../../resources",
relative_path)


Expand Down
16 changes: 8 additions & 8 deletions docs/components/Chatbot/demos/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def flushed():
chatbot = mgr.Chatbot(
value=conversation,
avatar_images=[
os.path.join(os.path.dirname(__file__), "../resources/user.jpeg"),
{
"name":
"bot",
"avatar":
os.path.join(os.path.dirname(__file__),
"../resources/bot.jpeg")
}
os.path.join(os.path.dirname(__file__),
"../../resources/user.jpeg"), {
"name":
"bot",
"avatar":
os.path.join(os.path.dirname(__file__),
"../../resources/bot.jpeg")
}
],
height=600,
)
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Chatbot/demos/multi_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def resolve_assets(relative_path):
return os.path.join(os.path.dirname(__file__), "../resources",
return os.path.join(os.path.dirname(__file__), "../../resources",
relative_path)


Expand Down
2 changes: 1 addition & 1 deletion docs/components/Chatbot/demos/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def resolve_assets(relative_path):
return os.path.join(os.path.dirname(__file__), "../resources",
return os.path.join(os.path.dirname(__file__), "../../resources",
relative_path)


Expand Down
2 changes: 1 addition & 1 deletion docs/components/Markdown/README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ template只能做简单的变量替换,如果想要引入更多自定义的行
custom_select.js

```js
<file src="./resources/custom_components/custom_select.js"></file>
<file src="../resources/custom_components/custom_select.js"></file>
```

</demo-suffix>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Markdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The template can only perform simple variable replacements. If you want to intro
custom_select.js

```js
<file src="./resources/custom_components/custom_select.js"></file>
<file src="../resources/custom_components/custom_select.js"></file>
```

</demo-suffix>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Markdown/demos/custom-tag3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def resolve_assets(relative_path):
return os.path.join(os.path.dirname(__file__), "../resources",
return os.path.join(os.path.dirname(__file__), "../../resources",
relative_path)


Expand Down
2 changes: 1 addition & 1 deletion docs/components/Markdown/demos/custom-tag4.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def resolve_assets(relative_path):
return os.path.join(os.path.dirname(__file__), "../resources",
return os.path.join(os.path.dirname(__file__), "../../resources",
relative_path)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"label":
"A",
"imgSrc":
os.path.join(os.path.dirname(__file__), '../../../resources/screen.jpeg'),
os.path.join(os.path.dirname(__file__),
'../../../../resources/screen.jpeg'),
"value":
"a"
}, "b", "c", "d"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"label":
"A",
"imgSrc":
os.path.join(os.path.dirname(__file__), '../../../resources/screen.jpeg'),
os.path.join(os.path.dirname(__file__),
'../../../../resources/screen.jpeg'),
"value":
"a"
}, "b", "c", "d"]
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Markdown/demos/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def resolve_assets(relative_path):
return os.path.join(os.path.dirname(__file__), "../resources",
return os.path.join(os.path.dirname(__file__), "../../resources",
relative_path)


Expand Down
Binary file removed docs/components/Markdown/resources/audio.wav
Binary file not shown.
Binary file removed docs/components/Markdown/resources/bot.jpeg
Binary file not shown.

This file was deleted.

Binary file removed docs/components/Markdown/resources/dog.mp4
Binary file not shown.
Binary file removed docs/components/Markdown/resources/screen.jpeg
Binary file not shown.
Binary file removed docs/components/Markdown/resources/user.jpeg
Binary file not shown.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit faf3edc

Please sign in to comment.