modelscope-studio 0.0.1b1__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/LICENSE +1 -3
  2. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/PKG-INFO +2 -2
  3. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/README.md +1 -1
  4. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Chatbot/__init__.py +6 -5
  5. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Chatbot/__init__.pyi +6 -5
  6. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Chatbot/templates/component/index.js +3860 -3836
  7. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Markdown/__init__.py +6 -6
  8. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Markdown/__init__.pyi +6 -6
  9. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Markdown/templates/component/index.js +3375 -3353
  10. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Markdown/templates/example/index.js +3208 -3194
  11. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/pyproject.toml +1 -4
  12. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/.gitignore +0 -0
  13. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/__init__.py +0 -0
  14. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Chatbot/llm_thinking_presets.py +0 -0
  15. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Chatbot/templates/component/style.css +0 -0
  16. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Chatbot/templates/example/index.js +0 -0
  17. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Chatbot/templates/example/style.css +0 -0
  18. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Markdown/templates/component/style.css +0 -0
  19. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/Markdown/templates/example/style.css +0 -0
  20. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/MultimodalInput/__init__.py +0 -0
  21. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/MultimodalInput/__init__.pyi +0 -0
  22. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/MultimodalInput/templates/component/__vite-browser-external-2447137e.js +0 -0
  23. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/MultimodalInput/templates/component/index.js +0 -0
  24. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/MultimodalInput/templates/component/style.css +0 -0
  25. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/MultimodalInput/templates/component/wrapper-6f348d45-f837cf34.js +0 -0
  26. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/MultimodalInput/templates/example/index.js +0 -0
  27. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/components/MultimodalInput/templates/example/style.css +0 -0
  28. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/utils/__init__.py +0 -0
  29. {modelscope_studio-0.0.1b1 → modelscope_studio-0.0.3}/backend/modelscope_studio/utils/process_links.py +0 -0
@@ -1,5 +1,3 @@
1
- Copyright 2022-2023 Alibaba ModelScope. All rights reserved.
2
-
3
1
  Apache License
4
2
  Version 2.0, January 2004
5
3
  http://www.apache.org/licenses/
@@ -188,7 +186,7 @@ Copyright 2022-2023 Alibaba ModelScope. All rights reserved.
188
186
  same "printed page" as the copyright notice for easier
189
187
  identification within third-party archives.
190
188
 
191
- Copyright 2020-2022 Alibaba ModelScope.
189
+ Copyright [yyyy] [name of copyright owner]
192
190
 
193
191
  Licensed under the Apache License, Version 2.0 (the "License");
194
192
  you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modelscope_studio
3
- Version: 0.0.1b1
3
+ Version: 0.0.3
4
4
  Summary: A set of extension component, inluding components for conversational input and display in multimodal scenarios, as well as more components for vertical scenarios.
5
5
  Author-email: YOUR NAME <YOUREMAIL@domain.com>
6
6
  License-Expression: Apache-2.0
@@ -36,7 +36,7 @@ Description-Content-Type: text/markdown
36
36
  <p>
37
37
 
38
38
  <p align="center">
39
- 🤖 <a href="https://modelscope.cn/studios/modelscope/modelscope-studio/summary">Modelscope Studio</a> | 🤗 <a href="https://huggingface.co/spaces/modelscope/modelscope-studio">HuggingFace Space</a>
39
+ <a href="https://github.com/modelscope/modelscope-studio">Github</a> | 🤖 <a href="https://modelscope.cn/studios/modelscope/modelscope-studio/summary">Modelscope Studio</a> | 🤗 <a href="https://huggingface.co/spaces/modelscope/modelscope-studio">HuggingFace Space</a>
40
40
  <br>
41
41
  <a href="README-zh_CN.md">中文</a>&nbsp | &nbspEnglish
42
42
  </p>
@@ -9,7 +9,7 @@
9
9
  <p>
10
10
 
11
11
  <p align="center">
12
- 🤖 <a href="https://modelscope.cn/studios/modelscope/modelscope-studio/summary">Modelscope Studio</a> | 🤗 <a href="https://huggingface.co/spaces/modelscope/modelscope-studio">HuggingFace Space</a>
12
+ <a href="https://github.com/modelscope/modelscope-studio">Github</a> | 🤖 <a href="https://modelscope.cn/studios/modelscope/modelscope-studio/summary">Modelscope Studio</a> | 🤗 <a href="https://huggingface.co/spaces/modelscope/modelscope-studio">HuggingFace Space</a>
13
13
  <br>
14
14
  <a href="README-zh_CN.md">中文</a>&nbsp | &nbspEnglish
15
15
  </p>
@@ -80,7 +80,6 @@ class ModelScopeChatbot(Component):
80
80
  elem_classes: list[str] | str | None = None,
81
81
  render: bool = True,
82
82
  height: int | None = None,
83
- latex_delimiters: list[dict[str, str | bool]] | None = None,
84
83
  rtl: bool = False,
85
84
  show_share_button: bool | None = None,
86
85
  show_copy_button: bool = False,
@@ -98,6 +97,8 @@ class ModelScopeChatbot(Component):
98
97
  flushing: bool = True,
99
98
  flushing_speed: int = 5,
100
99
  enable_base64: bool = False,
100
+ enable_latex: bool = True,
101
+ latex_single_dollar_delimiter: bool = True,
101
102
  preview: bool = True,
102
103
  llm_thinking_presets: list[dict] = [],
103
104
  data_postprocess: Callable | None = None,
@@ -117,7 +118,8 @@ class ModelScopeChatbot(Component):
117
118
  elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
118
119
  render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
119
120
  height: height of the component in pixels.
120
- latex_delimiters: A list of dicts of the form {"left": open delimiter (str), "right": close delimiter (str), "display": whether to display in newline (bool)} that will be used to render LaTeX expressions. If not provided, `latex_delimiters` is set to `[{ "left": "$$", "right": "$$", "display": True }]`, so only expressions enclosed in $$ delimiters will be rendered as LaTeX, and in a new line. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html).
121
+ enable_latex: If True, will enable LaTeX rendering.
122
+ latex_single_dollar_delimiter: If True, will enable single dollar delimiter for LaTeX rendering.
121
123
  rtl: If True, sets the direction of the rendered text to right-to-left. Default is False, which renders text left-to-right.
122
124
  show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.
123
125
  show_copy_button: If True, will show a copy button for each chatbot message.
@@ -140,9 +142,8 @@ class ModelScopeChatbot(Component):
140
142
  self.likeable = likeable
141
143
  self.height = height
142
144
  self.rtl = rtl
143
- if latex_delimiters is None:
144
- latex_delimiters = [{"left": "$$", "right": "$$", "display": True}]
145
- self.latex_delimiters = latex_delimiters
145
+ self.enable_latex = enable_latex
146
+ self.latex_single_dollar_delimiter = latex_single_dollar_delimiter
146
147
  self.show_share_button = show_share_button
147
148
  self.render_markdown = render_markdown
148
149
  self.show_copy_button = show_copy_button
@@ -73,7 +73,6 @@ class ModelScopeChatbot(Component):
73
73
  elem_classes: list[str] | str | None = None,
74
74
  render: bool = True,
75
75
  height: int | None = None,
76
- latex_delimiters: list[dict[str, str | bool]] | None = None,
77
76
  rtl: bool = False,
78
77
  show_share_button: bool | None = None,
79
78
  show_copy_button: bool = False,
@@ -91,6 +90,8 @@ class ModelScopeChatbot(Component):
91
90
  flushing: bool = True,
92
91
  flushing_speed: int = 5,
93
92
  enable_base64: bool = False,
93
+ enable_latex: bool = True,
94
+ latex_single_dollar_delimiter: bool = True,
94
95
  preview: bool = True,
95
96
  llm_thinking_presets: list[dict] = [],
96
97
  data_postprocess: Callable | None = None,
@@ -110,7 +111,8 @@ class ModelScopeChatbot(Component):
110
111
  elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
111
112
  render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
112
113
  height: height of the component in pixels.
113
- latex_delimiters: A list of dicts of the form {"left": open delimiter (str), "right": close delimiter (str), "display": whether to display in newline (bool)} that will be used to render LaTeX expressions. If not provided, `latex_delimiters` is set to `[{ "left": "$$", "right": "$$", "display": True }]`, so only expressions enclosed in $$ delimiters will be rendered as LaTeX, and in a new line. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html).
114
+ enable_latex: If True, will enable LaTeX rendering.
115
+ latex_single_dollar_delimiter: If True, will enable single dollar delimiter for LaTeX rendering.
114
116
  rtl: If True, sets the direction of the rendered text to right-to-left. Default is False, which renders text left-to-right.
115
117
  show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.
116
118
  show_copy_button: If True, will show a copy button for each chatbot message.
@@ -133,9 +135,8 @@ class ModelScopeChatbot(Component):
133
135
  self.likeable = likeable
134
136
  self.height = height
135
137
  self.rtl = rtl
136
- if latex_delimiters is None:
137
- latex_delimiters = [{"left": "$$", "right": "$$", "display": True}]
138
- self.latex_delimiters = latex_delimiters
138
+ self.enable_latex = enable_latex
139
+ self.latex_single_dollar_delimiter = latex_single_dollar_delimiter
139
140
  self.show_share_button = show_share_button
140
141
  self.render_markdown = render_markdown
141
142
  self.show_copy_button = show_copy_button