xinference 0.14.4.post1__py3-none-any.whl → 0.15.1__py3-none-any.whl

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.

Potentially problematic release.


This version of xinference might be problematic. Click here for more details.

Files changed (194) hide show
  1. xinference/_compat.py +51 -0
  2. xinference/_version.py +3 -3
  3. xinference/api/restful_api.py +209 -40
  4. xinference/client/restful/restful_client.py +7 -26
  5. xinference/conftest.py +1 -1
  6. xinference/constants.py +5 -0
  7. xinference/core/cache_tracker.py +1 -1
  8. xinference/core/chat_interface.py +8 -14
  9. xinference/core/event.py +1 -1
  10. xinference/core/image_interface.py +28 -0
  11. xinference/core/model.py +110 -31
  12. xinference/core/scheduler.py +37 -37
  13. xinference/core/status_guard.py +1 -1
  14. xinference/core/supervisor.py +17 -10
  15. xinference/core/utils.py +80 -22
  16. xinference/core/worker.py +17 -16
  17. xinference/deploy/cmdline.py +8 -16
  18. xinference/deploy/local.py +1 -1
  19. xinference/deploy/supervisor.py +1 -1
  20. xinference/deploy/utils.py +1 -1
  21. xinference/deploy/worker.py +1 -1
  22. xinference/model/audio/cosyvoice.py +86 -41
  23. xinference/model/audio/fish_speech.py +9 -9
  24. xinference/model/audio/model_spec.json +9 -9
  25. xinference/model/audio/whisper.py +4 -1
  26. xinference/model/embedding/core.py +52 -31
  27. xinference/model/image/core.py +2 -1
  28. xinference/model/image/model_spec.json +16 -4
  29. xinference/model/image/model_spec_modelscope.json +16 -4
  30. xinference/model/image/sdapi.py +136 -0
  31. xinference/model/image/stable_diffusion/core.py +164 -19
  32. xinference/model/llm/__init__.py +29 -11
  33. xinference/model/llm/llama_cpp/core.py +16 -33
  34. xinference/model/llm/llm_family.json +1011 -1296
  35. xinference/model/llm/llm_family.py +34 -53
  36. xinference/model/llm/llm_family_csghub.json +18 -35
  37. xinference/model/llm/llm_family_modelscope.json +981 -1122
  38. xinference/model/llm/lmdeploy/core.py +56 -88
  39. xinference/model/llm/mlx/core.py +46 -69
  40. xinference/model/llm/sglang/core.py +36 -18
  41. xinference/model/llm/transformers/chatglm.py +168 -306
  42. xinference/model/llm/transformers/cogvlm2.py +36 -63
  43. xinference/model/llm/transformers/cogvlm2_video.py +33 -223
  44. xinference/model/llm/transformers/core.py +55 -50
  45. xinference/model/llm/transformers/deepseek_v2.py +340 -0
  46. xinference/model/llm/transformers/deepseek_vl.py +53 -96
  47. xinference/model/llm/transformers/glm4v.py +55 -111
  48. xinference/model/llm/transformers/intern_vl.py +39 -70
  49. xinference/model/llm/transformers/internlm2.py +32 -54
  50. xinference/model/llm/transformers/minicpmv25.py +22 -55
  51. xinference/model/llm/transformers/minicpmv26.py +158 -68
  52. xinference/model/llm/transformers/omnilmm.py +5 -28
  53. xinference/model/llm/transformers/qwen2_audio.py +168 -0
  54. xinference/model/llm/transformers/qwen2_vl.py +234 -0
  55. xinference/model/llm/transformers/qwen_vl.py +34 -86
  56. xinference/model/llm/transformers/utils.py +32 -38
  57. xinference/model/llm/transformers/yi_vl.py +32 -72
  58. xinference/model/llm/utils.py +280 -554
  59. xinference/model/llm/vllm/core.py +161 -100
  60. xinference/model/rerank/core.py +41 -8
  61. xinference/model/rerank/model_spec.json +7 -0
  62. xinference/model/rerank/model_spec_modelscope.json +7 -1
  63. xinference/model/utils.py +1 -31
  64. xinference/thirdparty/cosyvoice/bin/export_jit.py +64 -0
  65. xinference/thirdparty/cosyvoice/bin/export_trt.py +8 -0
  66. xinference/thirdparty/cosyvoice/bin/inference.py +5 -2
  67. xinference/thirdparty/cosyvoice/cli/cosyvoice.py +38 -22
  68. xinference/thirdparty/cosyvoice/cli/model.py +139 -26
  69. xinference/thirdparty/cosyvoice/flow/flow.py +15 -9
  70. xinference/thirdparty/cosyvoice/flow/length_regulator.py +20 -1
  71. xinference/thirdparty/cosyvoice/hifigan/generator.py +8 -4
  72. xinference/thirdparty/cosyvoice/llm/llm.py +14 -13
  73. xinference/thirdparty/cosyvoice/transformer/attention.py +7 -3
  74. xinference/thirdparty/cosyvoice/transformer/decoder.py +1 -1
  75. xinference/thirdparty/cosyvoice/transformer/embedding.py +4 -3
  76. xinference/thirdparty/cosyvoice/transformer/encoder.py +4 -2
  77. xinference/thirdparty/cosyvoice/utils/common.py +36 -0
  78. xinference/thirdparty/cosyvoice/utils/file_utils.py +16 -0
  79. xinference/thirdparty/deepseek_vl/serve/assets/Kelpy-Codos.js +100 -0
  80. xinference/thirdparty/deepseek_vl/serve/assets/avatar.png +0 -0
  81. xinference/thirdparty/deepseek_vl/serve/assets/custom.css +355 -0
  82. xinference/thirdparty/deepseek_vl/serve/assets/custom.js +22 -0
  83. xinference/thirdparty/deepseek_vl/serve/assets/favicon.ico +0 -0
  84. xinference/thirdparty/deepseek_vl/serve/examples/app.png +0 -0
  85. xinference/thirdparty/deepseek_vl/serve/examples/chart.png +0 -0
  86. xinference/thirdparty/deepseek_vl/serve/examples/mirror.png +0 -0
  87. xinference/thirdparty/deepseek_vl/serve/examples/pipeline.png +0 -0
  88. xinference/thirdparty/deepseek_vl/serve/examples/puzzle.png +0 -0
  89. xinference/thirdparty/deepseek_vl/serve/examples/rap.jpeg +0 -0
  90. xinference/thirdparty/fish_speech/fish_speech/configs/base.yaml +87 -0
  91. xinference/thirdparty/fish_speech/fish_speech/configs/firefly_gan_vq.yaml +33 -0
  92. xinference/thirdparty/fish_speech/fish_speech/configs/lora/r_8_alpha_16.yaml +4 -0
  93. xinference/thirdparty/fish_speech/fish_speech/configs/text2semantic_finetune.yaml +83 -0
  94. xinference/thirdparty/fish_speech/fish_speech/datasets/protos/text-data.proto +24 -0
  95. xinference/thirdparty/fish_speech/fish_speech/i18n/README.md +27 -0
  96. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/en_US.json +1 -1
  97. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/es_ES.json +1 -1
  98. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/ja_JP.json +1 -1
  99. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/pt_BR.json +1 -1
  100. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/zh_CN.json +1 -1
  101. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/llama.py +2 -2
  102. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/__init__.py +0 -3
  103. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/firefly.py +169 -198
  104. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/fsq.py +4 -27
  105. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/.gitignore +114 -0
  106. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/README.md +36 -0
  107. xinference/thirdparty/fish_speech/fish_speech/text/clean.py +9 -47
  108. xinference/thirdparty/fish_speech/fish_speech/text/spliter.py +2 -2
  109. xinference/thirdparty/fish_speech/fish_speech/train.py +2 -0
  110. xinference/thirdparty/fish_speech/fish_speech/webui/css/style.css +161 -0
  111. xinference/thirdparty/fish_speech/fish_speech/webui/html/footer.html +11 -0
  112. xinference/thirdparty/fish_speech/fish_speech/webui/js/animate.js +69 -0
  113. xinference/thirdparty/fish_speech/fish_speech/webui/manage.py +12 -10
  114. xinference/thirdparty/fish_speech/tools/api.py +79 -134
  115. xinference/thirdparty/fish_speech/tools/commons.py +35 -0
  116. xinference/thirdparty/fish_speech/tools/download_models.py +3 -3
  117. xinference/thirdparty/fish_speech/tools/file.py +17 -0
  118. xinference/thirdparty/fish_speech/tools/llama/build_dataset.py +1 -1
  119. xinference/thirdparty/fish_speech/tools/llama/generate.py +29 -24
  120. xinference/thirdparty/fish_speech/tools/llama/merge_lora.py +1 -1
  121. xinference/thirdparty/fish_speech/tools/llama/quantize.py +2 -2
  122. xinference/thirdparty/fish_speech/tools/msgpack_api.py +34 -0
  123. xinference/thirdparty/fish_speech/tools/post_api.py +85 -44
  124. xinference/thirdparty/fish_speech/tools/sensevoice/README.md +59 -0
  125. xinference/thirdparty/fish_speech/tools/sensevoice/fun_asr.py +1 -1
  126. xinference/thirdparty/fish_speech/tools/smart_pad.py +16 -3
  127. xinference/thirdparty/fish_speech/tools/vqgan/extract_vq.py +2 -2
  128. xinference/thirdparty/fish_speech/tools/vqgan/inference.py +4 -2
  129. xinference/thirdparty/fish_speech/tools/webui.py +12 -146
  130. xinference/thirdparty/matcha/VERSION +1 -0
  131. xinference/thirdparty/matcha/hifigan/LICENSE +21 -0
  132. xinference/thirdparty/matcha/hifigan/README.md +101 -0
  133. xinference/thirdparty/omnilmm/LICENSE +201 -0
  134. xinference/thirdparty/whisper/__init__.py +156 -0
  135. xinference/thirdparty/whisper/__main__.py +3 -0
  136. xinference/thirdparty/whisper/assets/gpt2.tiktoken +50256 -0
  137. xinference/thirdparty/whisper/assets/mel_filters.npz +0 -0
  138. xinference/thirdparty/whisper/assets/multilingual.tiktoken +50257 -0
  139. xinference/thirdparty/whisper/audio.py +157 -0
  140. xinference/thirdparty/whisper/decoding.py +826 -0
  141. xinference/thirdparty/whisper/model.py +314 -0
  142. xinference/thirdparty/whisper/normalizers/__init__.py +2 -0
  143. xinference/thirdparty/whisper/normalizers/basic.py +76 -0
  144. xinference/thirdparty/whisper/normalizers/english.json +1741 -0
  145. xinference/thirdparty/whisper/normalizers/english.py +550 -0
  146. xinference/thirdparty/whisper/timing.py +386 -0
  147. xinference/thirdparty/whisper/tokenizer.py +395 -0
  148. xinference/thirdparty/whisper/transcribe.py +605 -0
  149. xinference/thirdparty/whisper/triton_ops.py +109 -0
  150. xinference/thirdparty/whisper/utils.py +316 -0
  151. xinference/thirdparty/whisper/version.py +1 -0
  152. xinference/types.py +14 -53
  153. xinference/web/ui/build/asset-manifest.json +6 -6
  154. xinference/web/ui/build/index.html +1 -1
  155. xinference/web/ui/build/static/css/{main.4bafd904.css → main.5061c4c3.css} +2 -2
  156. xinference/web/ui/build/static/css/main.5061c4c3.css.map +1 -0
  157. xinference/web/ui/build/static/js/main.754740c0.js +3 -0
  158. xinference/web/ui/build/static/js/{main.eb13fe95.js.LICENSE.txt → main.754740c0.js.LICENSE.txt} +2 -0
  159. xinference/web/ui/build/static/js/main.754740c0.js.map +1 -0
  160. xinference/web/ui/node_modules/.cache/babel-loader/10c69dc7a296779fcffedeff9393d832dfcb0013c36824adf623d3c518b801ff.json +1 -0
  161. xinference/web/ui/node_modules/.cache/babel-loader/68bede6d95bb5ef0b35bbb3ec5b8c937eaf6862c6cdbddb5ef222a7776aaf336.json +1 -0
  162. xinference/web/ui/node_modules/.cache/babel-loader/77d50223f3e734d4485cca538cb098a8c3a7a0a1a9f01f58cdda3af42fe1adf5.json +1 -0
  163. xinference/web/ui/node_modules/.cache/babel-loader/a56d5a642409a84988891089c98ca28ad0546432dfbae8aaa51bc5a280e1cdd2.json +1 -0
  164. xinference/web/ui/node_modules/.cache/babel-loader/cd90b08d177025dfe84209596fc51878f8a86bcaa6a240848a3d2e5fd4c7ff24.json +1 -0
  165. xinference/web/ui/node_modules/.cache/babel-loader/d9ff696a3e3471f01b46c63d18af32e491eb5dc0e43cb30202c96871466df57f.json +1 -0
  166. xinference/web/ui/node_modules/.cache/babel-loader/e42b72d4cc1ea412ebecbb8d040dc6c6bfee462c33903c2f1f3facb602ad742e.json +1 -0
  167. xinference/web/ui/node_modules/.cache/babel-loader/f5039ddbeb815c51491a1989532006b96fc3ae49c6c60e3c097f875b4ae915ae.json +1 -0
  168. xinference/web/ui/node_modules/.package-lock.json +37 -0
  169. xinference/web/ui/node_modules/a-sync-waterfall/package.json +21 -0
  170. xinference/web/ui/node_modules/nunjucks/node_modules/commander/package.json +48 -0
  171. xinference/web/ui/node_modules/nunjucks/package.json +112 -0
  172. xinference/web/ui/package-lock.json +38 -0
  173. xinference/web/ui/package.json +1 -0
  174. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/METADATA +16 -10
  175. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/RECORD +179 -127
  176. xinference/model/llm/transformers/llama_2.py +0 -108
  177. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/lit_module.py +0 -442
  178. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/discriminator.py +0 -44
  179. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/reference.py +0 -115
  180. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/wavenet.py +0 -225
  181. xinference/thirdparty/fish_speech/tools/auto_rerank.py +0 -159
  182. xinference/thirdparty/fish_speech/tools/gen_ref.py +0 -36
  183. xinference/thirdparty/fish_speech/tools/merge_asr_files.py +0 -55
  184. xinference/web/ui/build/static/css/main.4bafd904.css.map +0 -1
  185. xinference/web/ui/build/static/js/main.eb13fe95.js +0 -3
  186. xinference/web/ui/build/static/js/main.eb13fe95.js.map +0 -1
  187. xinference/web/ui/node_modules/.cache/babel-loader/0b11a5339468c13b2d31ac085e7effe4303259b2071abd46a0a8eb8529233a5e.json +0 -1
  188. xinference/web/ui/node_modules/.cache/babel-loader/213b5913e164773c2b0567455377765715f5f07225fbac77ad8e1e9dc9648a47.json +0 -1
  189. xinference/web/ui/node_modules/.cache/babel-loader/5c26a23b5eacf5b752a08531577ae3840bb247745ef9a39583dc2d05ba93a82a.json +0 -1
  190. xinference/web/ui/node_modules/.cache/babel-loader/978b57d1a04a701bc3fcfebc511f5f274eed6ed7eade67f6fb76c27d5fd9ecc8.json +0 -1
  191. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/LICENSE +0 -0
  192. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/WHEEL +0 -0
  193. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/entry_points.txt +0 -0
  194. {xinference-0.14.4.post1.dist-info → xinference-0.15.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,109 @@
1
+ from functools import lru_cache
2
+
3
+ import numpy as np
4
+ import torch
5
+
6
+ try:
7
+ import triton
8
+ import triton.language as tl
9
+ except ImportError:
10
+ raise RuntimeError("triton import failed; try `pip install --pre triton`")
11
+
12
+
13
+ @triton.jit
14
+ def dtw_kernel(
15
+ cost, trace, x, x_stride, cost_stride, trace_stride, N, M, BLOCK_SIZE: tl.constexpr
16
+ ):
17
+ offsets = tl.arange(0, BLOCK_SIZE)
18
+ mask = offsets < M
19
+
20
+ for k in range(1, N + M + 1): # k = i + j
21
+ tl.debug_barrier()
22
+
23
+ p0 = cost + (k - 1) * cost_stride
24
+ p1 = cost + k * cost_stride
25
+ p2 = cost + k * cost_stride + 1
26
+
27
+ c0 = tl.load(p0 + offsets, mask=mask)
28
+ c1 = tl.load(p1 + offsets, mask=mask)
29
+ c2 = tl.load(p2 + offsets, mask=mask)
30
+
31
+ x_row = tl.load(x + (k - 1) * x_stride + offsets, mask=mask, other=0)
32
+ cost_row = x_row + tl.minimum(tl.minimum(c0, c1), c2)
33
+
34
+ cost_ptr = cost + (k + 1) * cost_stride + 1
35
+ tl.store(cost_ptr + offsets, cost_row, mask=mask)
36
+
37
+ trace_ptr = trace + (k + 1) * trace_stride + 1
38
+ tl.store(trace_ptr + offsets, 2, mask=mask & (c2 <= c0) & (c2 <= c1))
39
+ tl.store(trace_ptr + offsets, 1, mask=mask & (c1 <= c0) & (c1 <= c2))
40
+ tl.store(trace_ptr + offsets, 0, mask=mask & (c0 <= c1) & (c0 <= c2))
41
+
42
+
43
+ @lru_cache(maxsize=None)
44
+ def median_kernel(filter_width: int):
45
+ @triton.jit
46
+ def kernel(
47
+ y, x, x_stride, y_stride, BLOCK_SIZE: tl.constexpr
48
+ ): # x.shape[-1] == filter_width
49
+ row_idx = tl.program_id(0)
50
+ offsets = tl.arange(0, BLOCK_SIZE)
51
+ mask = offsets < y_stride
52
+
53
+ x_ptr = x + row_idx * x_stride # noqa: F841
54
+ y_ptr = y + row_idx * y_stride
55
+
56
+ LOAD_ALL_ROWS_HERE # noqa: F821
57
+
58
+ BUBBLESORT_HERE # noqa: F821
59
+
60
+ tl.store(y_ptr + offsets, MIDDLE_ROW_HERE, mask=mask) # noqa: F821
61
+
62
+ kernel = triton.JITFunction(kernel.fn)
63
+ kernel.src = kernel.src.replace(
64
+ " LOAD_ALL_ROWS_HERE",
65
+ "\n".join(
66
+ [
67
+ f" row{i} = tl.load(x_ptr + offsets + {i}, mask=mask)"
68
+ for i in range(filter_width)
69
+ ]
70
+ ),
71
+ )
72
+ kernel.src = kernel.src.replace(
73
+ " BUBBLESORT_HERE",
74
+ "\n\n".join(
75
+ [
76
+ "\n\n".join(
77
+ [
78
+ "\n".join(
79
+ [
80
+ f" smaller = tl.where(row{j} < row{j + 1}, row{j}, row{j + 1})",
81
+ f" larger = tl.where(row{j} > row{j + 1}, row{j}, row{j + 1})",
82
+ f" row{j} = smaller",
83
+ f" row{j + 1} = larger",
84
+ ]
85
+ )
86
+ for j in range(filter_width - i - 1)
87
+ ]
88
+ )
89
+ for i in range(filter_width // 2 + 1)
90
+ ]
91
+ ),
92
+ )
93
+ kernel.src = kernel.src.replace("MIDDLE_ROW_HERE", f"row{filter_width // 2}")
94
+
95
+ return kernel
96
+
97
+
98
+ def median_filter_cuda(x: torch.Tensor, filter_width: int):
99
+ """Apply a median filter of given width along the last dimension of x"""
100
+ slices = x.contiguous().unfold(-1, filter_width, 1)
101
+ grid = np.prod(slices.shape[:-2])
102
+
103
+ kernel = median_kernel(filter_width)
104
+ y = torch.empty_like(slices[..., 0])
105
+
106
+ BLOCK_SIZE = 1 << (y.stride(-2) - 1).bit_length()
107
+ kernel[(grid,)](y, x, x.stride(-2), y.stride(-2), BLOCK_SIZE=BLOCK_SIZE)
108
+
109
+ return y
@@ -0,0 +1,316 @@
1
+ import json
2
+ import os
3
+ import re
4
+ import sys
5
+ import zlib
6
+ from typing import Callable, List, Optional, TextIO
7
+
8
+ system_encoding = sys.getdefaultencoding()
9
+
10
+ if system_encoding != "utf-8":
11
+
12
+ def make_safe(string):
13
+ # replaces any character not representable using the system default encoding with an '?',
14
+ # avoiding UnicodeEncodeError (https://github.com/openai/whisper/discussions/729).
15
+ return string.encode(system_encoding, errors="replace").decode(system_encoding)
16
+
17
+ else:
18
+
19
+ def make_safe(string):
20
+ # utf-8 can encode any Unicode code point, so no need to do the round-trip encoding
21
+ return string
22
+
23
+
24
+ def exact_div(x, y):
25
+ assert x % y == 0
26
+ return x // y
27
+
28
+
29
+ def str2bool(string):
30
+ str2val = {"True": True, "False": False}
31
+ if string in str2val:
32
+ return str2val[string]
33
+ else:
34
+ raise ValueError(f"Expected one of {set(str2val.keys())}, got {string}")
35
+
36
+
37
+ def optional_int(string):
38
+ return None if string == "None" else int(string)
39
+
40
+
41
+ def optional_float(string):
42
+ return None if string == "None" else float(string)
43
+
44
+
45
+ def compression_ratio(text) -> float:
46
+ text_bytes = text.encode("utf-8")
47
+ return len(text_bytes) / len(zlib.compress(text_bytes))
48
+
49
+
50
+ def format_timestamp(
51
+ seconds: float, always_include_hours: bool = False, decimal_marker: str = "."
52
+ ):
53
+ assert seconds >= 0, "non-negative timestamp expected"
54
+ milliseconds = round(seconds * 1000.0)
55
+
56
+ hours = milliseconds // 3_600_000
57
+ milliseconds -= hours * 3_600_000
58
+
59
+ minutes = milliseconds // 60_000
60
+ milliseconds -= minutes * 60_000
61
+
62
+ seconds = milliseconds // 1_000
63
+ milliseconds -= seconds * 1_000
64
+
65
+ hours_marker = f"{hours:02d}:" if always_include_hours or hours > 0 else ""
66
+ return (
67
+ f"{hours_marker}{minutes:02d}:{seconds:02d}{decimal_marker}{milliseconds:03d}"
68
+ )
69
+
70
+
71
+ def get_start(segments: List[dict]) -> Optional[float]:
72
+ return next(
73
+ (w["start"] for s in segments for w in s["words"]),
74
+ segments[0]["start"] if segments else None,
75
+ )
76
+
77
+
78
+ def get_end(segments: List[dict]) -> Optional[float]:
79
+ return next(
80
+ (w["end"] for s in reversed(segments) for w in reversed(s["words"])),
81
+ segments[-1]["end"] if segments else None,
82
+ )
83
+
84
+
85
+ class ResultWriter:
86
+ extension: str
87
+
88
+ def __init__(self, output_dir: str):
89
+ self.output_dir = output_dir
90
+
91
+ def __call__(
92
+ self, result: dict, audio_path: str, options: Optional[dict] = None, **kwargs
93
+ ):
94
+ audio_basename = os.path.basename(audio_path)
95
+ audio_basename = os.path.splitext(audio_basename)[0]
96
+ output_path = os.path.join(
97
+ self.output_dir, audio_basename + "." + self.extension
98
+ )
99
+
100
+ with open(output_path, "w", encoding="utf-8") as f:
101
+ self.write_result(result, file=f, options=options, **kwargs)
102
+
103
+ def write_result(
104
+ self, result: dict, file: TextIO, options: Optional[dict] = None, **kwargs
105
+ ):
106
+ raise NotImplementedError
107
+
108
+
109
+ class WriteTXT(ResultWriter):
110
+ extension: str = "txt"
111
+
112
+ def write_result(
113
+ self, result: dict, file: TextIO, options: Optional[dict] = None, **kwargs
114
+ ):
115
+ for segment in result["segments"]:
116
+ print(segment["text"].strip(), file=file, flush=True)
117
+
118
+
119
+ class SubtitlesWriter(ResultWriter):
120
+ always_include_hours: bool
121
+ decimal_marker: str
122
+
123
+ def iterate_result(
124
+ self,
125
+ result: dict,
126
+ options: Optional[dict] = None,
127
+ *,
128
+ max_line_width: Optional[int] = None,
129
+ max_line_count: Optional[int] = None,
130
+ highlight_words: bool = False,
131
+ max_words_per_line: Optional[int] = None,
132
+ ):
133
+ options = options or {}
134
+ max_line_width = max_line_width or options.get("max_line_width")
135
+ max_line_count = max_line_count or options.get("max_line_count")
136
+ highlight_words = highlight_words or options.get("highlight_words", False)
137
+ max_words_per_line = max_words_per_line or options.get("max_words_per_line")
138
+ preserve_segments = max_line_count is None or max_line_width is None
139
+ max_line_width = max_line_width or 1000
140
+ max_words_per_line = max_words_per_line or 1000
141
+
142
+ def iterate_subtitles():
143
+ line_len = 0
144
+ line_count = 1
145
+ # the next subtitle to yield (a list of word timings with whitespace)
146
+ subtitle: List[dict] = []
147
+ last: float = get_start(result["segments"]) or 0.0
148
+ for segment in result["segments"]:
149
+ chunk_index = 0
150
+ words_count = max_words_per_line
151
+ while chunk_index < len(segment["words"]):
152
+ remaining_words = len(segment["words"]) - chunk_index
153
+ if max_words_per_line > len(segment["words"]) - chunk_index:
154
+ words_count = remaining_words
155
+ for i, original_timing in enumerate(
156
+ segment["words"][chunk_index : chunk_index + words_count]
157
+ ):
158
+ timing = original_timing.copy()
159
+ long_pause = (
160
+ not preserve_segments and timing["start"] - last > 3.0
161
+ )
162
+ has_room = line_len + len(timing["word"]) <= max_line_width
163
+ seg_break = i == 0 and len(subtitle) > 0 and preserve_segments
164
+ if (
165
+ line_len > 0
166
+ and has_room
167
+ and not long_pause
168
+ and not seg_break
169
+ ):
170
+ # line continuation
171
+ line_len += len(timing["word"])
172
+ else:
173
+ # new line
174
+ timing["word"] = timing["word"].strip()
175
+ if (
176
+ len(subtitle) > 0
177
+ and max_line_count is not None
178
+ and (long_pause or line_count >= max_line_count)
179
+ or seg_break
180
+ ):
181
+ # subtitle break
182
+ yield subtitle
183
+ subtitle = []
184
+ line_count = 1
185
+ elif line_len > 0:
186
+ # line break
187
+ line_count += 1
188
+ timing["word"] = "\n" + timing["word"]
189
+ line_len = len(timing["word"].strip())
190
+ subtitle.append(timing)
191
+ last = timing["start"]
192
+ chunk_index += max_words_per_line
193
+ if len(subtitle) > 0:
194
+ yield subtitle
195
+
196
+ if len(result["segments"]) > 0 and "words" in result["segments"][0]:
197
+ for subtitle in iterate_subtitles():
198
+ subtitle_start = self.format_timestamp(subtitle[0]["start"])
199
+ subtitle_end = self.format_timestamp(subtitle[-1]["end"])
200
+ subtitle_text = "".join([word["word"] for word in subtitle])
201
+ if highlight_words:
202
+ last = subtitle_start
203
+ all_words = [timing["word"] for timing in subtitle]
204
+ for i, this_word in enumerate(subtitle):
205
+ start = self.format_timestamp(this_word["start"])
206
+ end = self.format_timestamp(this_word["end"])
207
+ if last != start:
208
+ yield last, start, subtitle_text
209
+
210
+ yield start, end, "".join(
211
+ [
212
+ re.sub(r"^(\s*)(.*)$", r"\1<u>\2</u>", word)
213
+ if j == i
214
+ else word
215
+ for j, word in enumerate(all_words)
216
+ ]
217
+ )
218
+ last = end
219
+ else:
220
+ yield subtitle_start, subtitle_end, subtitle_text
221
+ else:
222
+ for segment in result["segments"]:
223
+ segment_start = self.format_timestamp(segment["start"])
224
+ segment_end = self.format_timestamp(segment["end"])
225
+ segment_text = segment["text"].strip().replace("-->", "->")
226
+ yield segment_start, segment_end, segment_text
227
+
228
+ def format_timestamp(self, seconds: float):
229
+ return format_timestamp(
230
+ seconds=seconds,
231
+ always_include_hours=self.always_include_hours,
232
+ decimal_marker=self.decimal_marker,
233
+ )
234
+
235
+
236
+ class WriteVTT(SubtitlesWriter):
237
+ extension: str = "vtt"
238
+ always_include_hours: bool = False
239
+ decimal_marker: str = "."
240
+
241
+ def write_result(
242
+ self, result: dict, file: TextIO, options: Optional[dict] = None, **kwargs
243
+ ):
244
+ print("WEBVTT\n", file=file)
245
+ for start, end, text in self.iterate_result(result, options, **kwargs):
246
+ print(f"{start} --> {end}\n{text}\n", file=file, flush=True)
247
+
248
+
249
+ class WriteSRT(SubtitlesWriter):
250
+ extension: str = "srt"
251
+ always_include_hours: bool = True
252
+ decimal_marker: str = ","
253
+
254
+ def write_result(
255
+ self, result: dict, file: TextIO, options: Optional[dict] = None, **kwargs
256
+ ):
257
+ for i, (start, end, text) in enumerate(
258
+ self.iterate_result(result, options, **kwargs), start=1
259
+ ):
260
+ print(f"{i}\n{start} --> {end}\n{text}\n", file=file, flush=True)
261
+
262
+
263
+ class WriteTSV(ResultWriter):
264
+ """
265
+ Write a transcript to a file in TSV (tab-separated values) format containing lines like:
266
+ <start time in integer milliseconds>\t<end time in integer milliseconds>\t<transcript text>
267
+
268
+ Using integer milliseconds as start and end times means there's no chance of interference from
269
+ an environment setting a language encoding that causes the decimal in a floating point number
270
+ to appear as a comma; also is faster and more efficient to parse & store, e.g., in C++.
271
+ """
272
+
273
+ extension: str = "tsv"
274
+
275
+ def write_result(
276
+ self, result: dict, file: TextIO, options: Optional[dict] = None, **kwargs
277
+ ):
278
+ print("start", "end", "text", sep="\t", file=file)
279
+ for segment in result["segments"]:
280
+ print(round(1000 * segment["start"]), file=file, end="\t")
281
+ print(round(1000 * segment["end"]), file=file, end="\t")
282
+ print(segment["text"].strip().replace("\t", " "), file=file, flush=True)
283
+
284
+
285
+ class WriteJSON(ResultWriter):
286
+ extension: str = "json"
287
+
288
+ def write_result(
289
+ self, result: dict, file: TextIO, options: Optional[dict] = None, **kwargs
290
+ ):
291
+ json.dump(result, file)
292
+
293
+
294
+ def get_writer(
295
+ output_format: str, output_dir: str
296
+ ) -> Callable[[dict, TextIO, dict], None]:
297
+ writers = {
298
+ "txt": WriteTXT,
299
+ "vtt": WriteVTT,
300
+ "srt": WriteSRT,
301
+ "tsv": WriteTSV,
302
+ "json": WriteJSON,
303
+ }
304
+
305
+ if output_format == "all":
306
+ all_writers = [writer(output_dir) for writer in writers.values()]
307
+
308
+ def write_all(
309
+ result: dict, file: TextIO, options: Optional[dict] = None, **kwargs
310
+ ):
311
+ for writer in all_writers:
312
+ writer(result, file, options, **kwargs)
313
+
314
+ return write_all
315
+
316
+ return writers[output_format](output_dir)
@@ -0,0 +1 @@
1
+ __version__ = "20231117"
xinference/types.py CHANGED
@@ -24,11 +24,8 @@ from ._compat import (
24
24
  )
25
25
  from .fields import (
26
26
  echo_field,
27
- frequency_penalty_field,
28
- logprobs_field,
29
27
  max_tokens_field,
30
28
  none_field,
31
- presence_penalty_field,
32
29
  repeat_penalty_field,
33
30
  stop_field,
34
31
  stream_field,
@@ -39,8 +36,6 @@ from .fields import (
39
36
  top_p_field,
40
37
  )
41
38
 
42
- SPECIAL_TOOL_PROMPT = "<TOOL>"
43
-
44
39
 
45
40
  class Image(TypedDict):
46
41
  url: Optional[str]
@@ -52,6 +47,12 @@ class ImageList(TypedDict):
52
47
  data: List[Image]
53
48
 
54
49
 
50
+ class SDAPIResult(TypedDict):
51
+ images: List[str]
52
+ parameters: dict
53
+ info: dict
54
+
55
+
55
56
  class Video(TypedDict):
56
57
  url: Optional[str]
57
58
  b64_json: Optional[str]
@@ -142,7 +143,7 @@ class ToolCalls(TypedDict):
142
143
 
143
144
 
144
145
  class CompletionChoice(TypedDict):
145
- text: str
146
+ text: NotRequired[str]
146
147
  index: int
147
148
  logprobs: Optional[CompletionLogprobs]
148
149
  finish_reason: Optional[str]
@@ -402,41 +403,12 @@ except ImportError:
402
403
  CreateCompletionOpenAI: BaseModel
403
404
 
404
405
 
405
- class _CreateCompletionOpenAIFallback(BaseModel):
406
- # OpenAI's create completion request body, we define it by pydantic
407
- # model to verify the input params.
408
- # https://platform.openai.com/docs/api-reference/completions/object
409
- model: str
410
- prompt: str
411
- best_of: Optional[int] = 1
412
- echo: bool = echo_field
413
- frequency_penalty: Optional[float] = frequency_penalty_field
414
- logit_bias: Optional[Dict[str, float]] = none_field
415
- logprobs: Optional[int] = logprobs_field
416
- max_tokens: int = max_tokens_field
417
- n: Optional[int] = 1
418
- presence_penalty: Optional[float] = presence_penalty_field
419
- seed: Optional[int] = none_field
420
- stop: Optional[Union[str, List[str]]] = stop_field
421
- stream: bool = stream_field
422
- stream_options: Optional[Union[dict, None]] = stream_option_field
423
- suffix: Optional[str] = none_field
424
- temperature: float = temperature_field
425
- top_p: float = top_p_field
426
- user: Optional[str] = none_field
427
-
428
-
429
- try:
430
- # For openai > 1
431
- from openai.types.completion_create_params import CompletionCreateParamsNonStreaming
406
+ from openai.types.completion_create_params import CompletionCreateParamsNonStreaming
432
407
 
433
- CreateCompletionOpenAI = create_model_from_typeddict(
434
- CompletionCreateParamsNonStreaming,
435
- )
436
- CreateCompletionOpenAI = fix_forward_ref(CreateCompletionOpenAI)
437
- except ImportError:
438
- # TODO(codingl2k1): Remove it if openai < 1 is dropped.
439
- CreateCompletionOpenAI = _CreateCompletionOpenAIFallback
408
+ CreateCompletionOpenAI = create_model_from_typeddict(
409
+ CompletionCreateParamsNonStreaming,
410
+ )
411
+ CreateCompletionOpenAI = fix_forward_ref(CreateCompletionOpenAI)
440
412
 
441
413
 
442
414
  class CreateCompletion(
@@ -456,22 +428,11 @@ class CreateChatModel(BaseModel):
456
428
  CreateChatCompletionTorch = CreateCompletionTorch
457
429
  CreateChatCompletionLlamaCpp: BaseModel = CreateCompletionLlamaCpp
458
430
 
459
- # This type is for openai API compatibility
460
- CreateChatCompletionOpenAI: BaseModel
461
431
 
462
-
463
- # Only support openai > 1
464
- from openai.types.chat.completion_create_params import (
465
- CompletionCreateParamsNonStreaming,
466
- )
467
-
468
- CreateChatCompletionOpenAI = create_model_from_typeddict(
469
- CompletionCreateParamsNonStreaming,
470
- )
471
- CreateChatCompletionOpenAI = fix_forward_ref(CreateChatCompletionOpenAI)
432
+ from ._compat import CreateChatCompletionOpenAI
472
433
 
473
434
 
474
- class CreateChatCompletion(
435
+ class CreateChatCompletion( # type: ignore
475
436
  CreateChatModel,
476
437
  CreateChatCompletionTorch,
477
438
  CreateChatCompletionLlamaCpp,
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "files": {
3
- "main.css": "./static/css/main.4bafd904.css",
4
- "main.js": "./static/js/main.eb13fe95.js",
3
+ "main.css": "./static/css/main.5061c4c3.css",
4
+ "main.js": "./static/js/main.754740c0.js",
5
5
  "static/media/icon.webp": "./static/media/icon.4603d52c63041e5dfbfd.webp",
6
6
  "index.html": "./index.html",
7
- "main.4bafd904.css.map": "./static/css/main.4bafd904.css.map",
8
- "main.eb13fe95.js.map": "./static/js/main.eb13fe95.js.map"
7
+ "main.5061c4c3.css.map": "./static/css/main.5061c4c3.css.map",
8
+ "main.754740c0.js.map": "./static/js/main.754740c0.js.map"
9
9
  },
10
10
  "entrypoints": [
11
- "static/css/main.4bafd904.css",
12
- "static/js/main.eb13fe95.js"
11
+ "static/css/main.5061c4c3.css",
12
+ "static/js/main.754740c0.js"
13
13
  ]
14
14
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Xinference</title><script defer="defer" src="./static/js/main.eb13fe95.js"></script><link href="./static/css/main.4bafd904.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Xinference</title><script defer="defer" src="./static/js/main.754740c0.js"></script><link href="./static/css/main.5061c4c3.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -1,2 +1,2 @@
1
- .container{cursor:pointer;display:block}.container,.descriptionCard{border-radius:20px;height:300px;position:relative;width:300px}.descriptionCard{left:-1px;padding:20px;top:-1px}.cardTitle{display:flex;justify-content:space-between}.iconButtonBox{align-items:center;display:flex}.drawerCard{min-height:100%;padding:20px 80px 0;position:relative;width:60vw}.p{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;font-size:14px;overflow:hidden;padding:0 10px;text-overflow:ellipsis;word-break:break-word}.formContainer{height:80%;overflow:scroll;padding:0 10px}.buttonsContainer{align-items:center;bottom:50px;display:flex;justify-content:space-between;left:100px;position:absolute;right:100px}.buttonContainer{background-color:initial;border-width:0;width:45%}.buttonItem{border:1px solid #e5e7eb;border-radius:4px;padding:5px;width:100%}.instructionText{color:#666;font-size:12px;font-style:italic;margin:30px 0;text-align:center}.iconRow{bottom:20px;justify-content:space-between;left:20px;position:absolute;right:20px}.iconItem,.iconRow{align-items:center;display:flex}.iconItem{flex-direction:column;margin:20px}.boldIconText{font-size:1.2em;font-weight:700}.muiIcon{font-size:1.5em}.smallText{font-size:.8em}.dialogBox{background-color:#fff;height:607px;margin:32px;overflow-x:scroll;width:1241px}.dialogTitle{color:#000;display:flex;justify-content:space-between;padding:20px 20px 7px}.dialogTitle-model_name{font-size:18px;font-weight:700}.pathBox{cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:160px}.pathBox2{width:300px}.empty{color:#555;font-size:20px;left:50%;position:absolute;top:30%;-webkit-transform:translate(-50%);transform:translate(-50%)}.deleteDialog{align-items:center;display:flex}.warningIcon{color:#ed6c02;margin-right:10px}.jsonDialog{background-color:#fff;border-radius:8px;color:#000;display:flex;flex-direction:column;padding:10px 30px}.jsonDialog-title{align-items:center;display:flex;justify-content:space-between;margin:10px 0 20px}.title-name{font-size:16px;font-weight:700}.main-box{height:500px;width:700px}.textarea-box{border:1px solid #ddd;border-radius:5px;color:#444;height:100%;padding:5px 10px;resize:none;width:100%}.but-box{display:flex;justify-content:end;margin-top:20px}.copyText{color:#666;cursor:pointer;font-size:14px!important}.copyText:hover{color:#1976d2}.formBox{max-height:80vh;max-width:50vw;min-width:50vw;overflow:auto;padding:40px 20px 0 0;position:relative;transition:all .4s ease-in-out}.broaden{max-width:100%;min-width:100%;padding-right:0}.show-json{align-items:center;color:#444;display:flex;position:fixed;right:60px;top:90px}.icon{cursor:pointer;margin-left:20px;position:absolute;right:-40px}.icon:hover{color:#1976d2}.arrow{font-size:24px!important}.jsonBox{min-height:80vh;position:relative;transition:all .4s ease-in-out;width:100%}.hide{overflow:hidden;-webkit-transform:translate(30vw);transform:translate(30vw);width:0}.checkboxWrapper{align-items:center;display:flex;flex-wrap:wrap;width:100%}.jsonBox-header{align-items:center;display:flex;justify-content:space-between}.jsonBox-title{font-weight:700;line-height:40px}.textarea{border:1px solid #ddd;border-radius:5px;color:#444;height:calc(100% - 40px);padding:5px 10px;resize:none;width:100%}.addBtn{margin-left:20px!important}.item{background-color:#eee;border-radius:10px;margin:10px 50px 0;overflow:hidden;padding:20px;position:relative}.item:hover .deleteBtn{-webkit-transform:translateX(-50px);transform:translateX(-50px)}.deleteBtn{background-color:#1976d2;border-radius:25px;height:50px;line-height:70px;position:absolute;right:20px;text-align:center;top:calc(50% - 25px);-webkit-transform:translateX(80px);transform:translateX(80px);transition:all .3s ease-in-out;width:50px}.deleteBtn:hover{box-shadow:0 0 10px #aaa;cursor:pointer}.deleteIcon{color:#fff;font-size:28px!important}
2
- /*# sourceMappingURL=main.4bafd904.css.map*/
1
+ .container{cursor:pointer;display:block}.container,.descriptionCard{border-radius:20px;height:300px;position:relative;width:300px}.descriptionCard{left:-1px;padding:20px;top:-1px}.cardTitle{display:flex;justify-content:space-between}.iconButtonBox{align-items:center;display:flex}.drawerCard{min-height:100%;padding:20px 80px 0;position:relative;width:60vw}.p{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;font-size:14px;overflow:hidden;padding:0 10px;text-overflow:ellipsis;word-break:break-word}.formContainer{height:80%;overflow:scroll;padding:0 10px}.buttonsContainer{align-items:center;bottom:50px;display:flex;justify-content:space-between;left:100px;position:absolute;right:100px}.buttonContainer{background-color:initial;border-width:0;width:45%}.buttonItem{border:1px solid #e5e7eb;border-radius:4px;padding:5px;width:100%}.instructionText{color:#666;font-size:12px;font-style:italic;margin:30px 0;text-align:center}.iconRow{bottom:20px;justify-content:space-between;left:20px;position:absolute;right:20px}.iconItem,.iconRow{align-items:center;display:flex}.iconItem{flex-direction:column;margin:20px}.boldIconText{font-size:1.2em;font-weight:700}.muiIcon{font-size:1.5em}.smallText{font-size:.8em}.dialogBox{background-color:#fff;height:607px;margin:32px;overflow-x:scroll;width:1241px}.dialogTitle{color:#000;display:flex;justify-content:space-between;padding:20px 20px 7px}.dialogTitle-model_name{font-size:18px;font-weight:700}.pathBox{cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:160px}.pathBox2{width:300px}.empty{color:#555;font-size:20px;left:50%;position:absolute;top:30%;-webkit-transform:translate(-50%);transform:translate(-50%)}.deleteDialog{align-items:center;display:flex}.warningIcon{color:#ed6c02;margin-right:10px}.jsonDialog{background-color:#fff;border-radius:8px;color:#000;display:flex;flex-direction:column;padding:10px 30px}.jsonDialog-title{align-items:center;display:flex;justify-content:space-between;margin:10px 0 20px}.title-name{font-size:16px;font-weight:700}.main-box{height:500px;width:700px}.textarea-box{border:1px solid #ddd;border-radius:5px;color:#444;height:100%;padding:5px 10px;resize:none;width:100%}.but-box{display:flex;justify-content:end;margin-top:20px}.copyText{color:#666;cursor:pointer;font-size:14px!important}.copyText:hover{color:#1976d2}.formBox{max-height:80vh;max-width:50vw;min-width:50vw;overflow:auto;padding:40px 20px 0 0;position:relative;transition:all .4s ease-in-out}.broaden{max-width:100%;min-width:100%;padding-right:0}.show-json{align-items:center;color:#444;display:flex;position:fixed;right:60px;top:90px}.icon{cursor:pointer;margin-left:20px;position:absolute;right:-40px}.icon:hover{color:#1976d2}.arrow{font-size:24px!important}.jsonBox{min-height:80vh;position:relative;transition:all .4s ease-in-out;width:100%}.hide{overflow:hidden;-webkit-transform:translate(30vw);transform:translate(30vw);width:0}.checkboxWrapper{align-items:center;display:flex;flex-wrap:wrap;width:100%}.jsonBox-header{align-items:center;display:flex;justify-content:space-between}.jsonBox-title{font-weight:700;line-height:40px}.textarea{border:1px solid #ddd;border-radius:5px;color:#444;height:calc(100% - 40px);padding:5px 10px;resize:none;width:100%}.addBtn{margin-left:20px!important}.item{background-color:#eee;border-radius:10px;margin:10px 50px 0;overflow:hidden;padding:20px;position:relative}.item:hover .deleteBtn{-webkit-transform:translateX(-50px);transform:translateX(-50px)}.deleteBtn{background-color:#1976d2;border-radius:25px;height:50px;line-height:70px;position:absolute;right:20px;text-align:center;top:calc(50% - 25px);-webkit-transform:translateX(80px);transform:translateX(80px);transition:all .3s ease-in-out;width:50px}.deleteBtn:hover{box-shadow:0 0 10px #aaa;cursor:pointer}.deleteIcon{color:#fff;font-size:28px!important}.chat_template_box{align-items:start;display:flex;gap:10px}.chat_template_test{width:30%}.chat_template_test_mainBox{border:1px solid #ccc;border-radius:4px;height:137px;overflow:scroll;padding:10px}.chat_template_test_tip{color:rgba(0,0,0,.6);font-size:10px;margin:4px 14px 0}.test_res_box{background-color:#eee;border-radius:4px;margin-top:5px;min-height:55px;padding:10px}.css-19qh8xo-MuiInputBase-input-MuiOutlinedInput-input.Mui-disabled{-webkit-text-fill-color:#000!important}
2
+ /*# sourceMappingURL=main.5061c4c3.css.map*/
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static/css/main.5061c4c3.css","mappings":"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","sources":["scenes/launch_model/styles/modelCardStyle.css","components/copyComponent/style.css","scenes/register_model/styles/registerModelStyle.css"],"sourcesContent":[".container {\n display: block;\n position: relative;\n width: 300px;\n height: 300px;\n cursor: pointer;\n border-radius: 20px;\n}\n.descriptionCard {\n position: relative;\n top: -1px;\n left: -1px;\n width: 300px;\n height: 300px;\n padding: 20px;\n border-radius: 20px;\n}\n.cardTitle {\n display: flex;\n justify-content: space-between;\n}\n.iconButtonBox {\n display: flex;\n align-items: center;\n}\n.drawerCard {\n position: relative;\n padding: 20px 80px 0;\n min-height: 100%;\n width: 60vw;\n}\n.p {\n display: -webkit-box;\n -webkit-line-clamp: 4;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n font-size: 14px;\n padding: 0px 10px;\n}\n.formContainer {\n height: 80%;\n overflow: scroll;\n padding: 0 10px;\n}\n.buttonsContainer {\n position: absolute;\n bottom: 50px;\n left: 100px;\n right: 100px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.buttonContainer {\n width: 45%;\n border-width: 0px;\n background-color: transparent;\n}\n.buttonItem {\n width: 100%;\n padding: 5px;\n border-radius: 4px;\n border: 1px solid #e5e7eb;\n border-width: 1px;\n border-color: #e5e7eb;\n}\n.instructionText {\n font-size: 12px;\n color: #666666;\n font-style: italic;\n margin: 30px 0;\n text-align: center;\n}\n.iconRow {\n position: absolute;\n bottom: 20px;\n left: 20px;\n right: 20px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.iconItem {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 20px;\n}\n.boldIconText {\n font-weight: bold;\n font-size: 1.2em;\n}\n.muiIcon {\n font-size: 1.5em;\n}\n.smallText {\n font-size: 0.8em;\n}\n.dialogBox {\n width: 1241px;\n height: 607px;\n background-color: #fff;\n margin: 32px;\n overflow-x: scroll;\n}\n.dialogTitle {\n display: flex;\n justify-content: space-between;\n padding: 20px 20px 7px;\n color: #000;\n}\n.dialogTitle-model_name {\n font-size: 18px;\n font-weight: 700;\n}\n.pathBox {\n width: 160px;\n cursor: pointer;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.pathBox2 {\n width: 300px;\n}\n.empty {\n position: absolute;\n left: 50%;\n top: 30%;\n font-size: 20px;\n color: #555;\n transform: translate(-50%, 0);\n}\n.deleteDialog {\n display: flex;\n align-items: center;\n}\n.warningIcon {\n margin-right: 10px;\n color: rgb(237, 108, 2);\n}\n.jsonDialog {\n display: flex;\n flex-direction: column;\n padding: 10px 30px;\n background-color: #fff;\n color: #000;\n border-radius: 8px;\n}\n.jsonDialog-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 10px 0 20px 0;\n}\n.title-name {\n font-size: 16px;\n font-weight: 700;\n}\n.main-box {\n width: 700px;\n height: 500px;\n}\n.textarea-box {\n width: 100%;\n height: 100%;\n padding: 5px 10px;\n border: 1px solid #ddd;\n border-radius: 5px;\n resize: none;\n color: #444;\n}\n.but-box {\n display: flex;\n justify-content: end;\n margin-top: 20px;\n}\n",".copyText {\n font-size: 14px !important;\n color: #666;\n cursor: pointer;\n}\n\n.copyText:hover {\n color: #1976d2;\n}\n",".formBox {\n position: relative;\n max-width: 50vw;\n min-width: 50vw;\n max-height: 80vh;\n overflow: auto;\n padding: 40px 20px 0 0;\n transition: all 0.4s ease-in-out;\n}\n\n.broaden {\n max-width: 100%;\n min-width: 100%;\n padding-right: 0;\n}\n\n.show-json {\n display: flex;\n align-items: center;\n position: fixed;\n top: 90px;\n right: 60px;\n color: #444;\n}\n\n.icon {\n position: absolute;\n right: -40px;\n cursor: pointer;\n margin-left: 20px;\n}\n\n.icon:hover {\n color: #1976d2;\n}\n\n.arrow {\n font-size: 24px !important;\n}\n\n.jsonBox {\n position: relative;\n min-height: 80vh;\n width: 100%;\n transition: all 0.4s ease-in-out;\n}\n\n.hide {\n width: 0;\n transform: translate(30vw, 0);\n overflow: hidden;\n}\n\n.checkboxWrapper {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n}\n\n.jsonBox-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.jsonBox-title {\n line-height: 40px;\n font-weight: 700;\n}\n\n.textarea {\n width: 100%;\n height: calc(100% - 40px);\n padding: 5px 10px;\n border: 1px solid #ddd;\n border-radius: 5px;\n resize: none;\n color: #444;\n}\n\n.addBtn {\n margin-left: 20px !important;\n}\n\n.item {\n position: relative;\n background-color: #eee;\n margin: 10px 50px 0;\n padding: 20px;\n border-radius: 10px;\n overflow: hidden;\n}\n\n.item:hover .deleteBtn {\n transform: translateX(-50px);\n}\n\n.deleteBtn {\n position: absolute;\n right: 20px;\n top: calc(50% - 25px);\n width: 50px;\n height: 50px;\n transform: translateX(80px);\n text-align: center;\n line-height: 70px;\n border-radius: 25px;\n background-color: #1976d2;\n transition: all 0.3s ease-in-out;\n}\n\n.deleteBtn:hover {\n cursor: pointer;\n box-shadow: 0 0 10px #aaa;\n}\n\n.deleteIcon {\n font-size: 28px !important;\n color: #fff;\n}\n\n.chat_template_box {\n display: flex;\n align-items: start;\n gap: 10px;\n}\n\n.chat_template_test {\n width: 30%;\n}\n\n.chat_template_test_mainBox {\n height: 137px;\n padding: 10px;\n border: 1px solid #ccc;\n border-radius: 4px;\n overflow: scroll;\n}\n\n.chat_template_test_tip {\n font-size: 10px;\n margin: 4px 14px 0;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.test_res_box {\n background-color: #eee;\n min-height: 55px;\n padding: 10px;\n margin-top: 5px;\n border-radius: 4px;\n}\n\n.css-19qh8xo-MuiInputBase-input-MuiOutlinedInput-input.Mui-disabled {\n -webkit-text-fill-color: #000 !important;\n}\n"],"names":[],"sourceRoot":""}