ckadirt commited on
Commit
9aa41ea
·
verified ·
1 Parent(s): ccffc15

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +12 -0
  2. rtme/lib/python3.10/site-packages/babel/locale-data/my.dat +3 -0
  3. rtme/lib/python3.10/site-packages/babel/locale-data/or.dat +3 -0
  4. rtme/lib/python3.10/site-packages/babel/locale-data/sq.dat +3 -0
  5. rtme/lib/python3.10/site-packages/babel/locale-data/sr.dat +3 -0
  6. rtme/lib/python3.10/site-packages/babel/locale-data/tk.dat +3 -0
  7. rtme/lib/python3.10/site-packages/babel/locale-data/uk.dat +3 -0
  8. rtme/lib/python3.10/site-packages/babel/locale-data/vec.dat +3 -0
  9. rtme/lib/python3.10/site-packages/babel/locale-data/xnr.dat +3 -0
  10. rtme/lib/python3.10/site-packages/babel/locale-data/yo.dat +3 -0
  11. rtme/lib/python3.10/site-packages/babel/locale-data/yrl.dat +3 -0
  12. rtme/lib/python3.10/site-packages/babel/locale-data/yue_Hans.dat +3 -0
  13. rtme/lib/python3.10/site-packages/babel/locale-data/zu.dat +3 -0
  14. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__init__.py +188 -0
  15. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/__init__.cpython-310.pyc +0 -0
  16. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/audio_classification.cpython-310.pyc +0 -0
  17. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/audio_to_audio.cpython-310.pyc +0 -0
  18. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/automatic_speech_recognition.cpython-310.pyc +0 -0
  19. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/base.cpython-310.pyc +0 -0
  20. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/chat_completion.cpython-310.pyc +0 -0
  21. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/depth_estimation.cpython-310.pyc +0 -0
  22. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/document_question_answering.cpython-310.pyc +0 -0
  23. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/feature_extraction.cpython-310.pyc +0 -0
  24. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/fill_mask.cpython-310.pyc +0 -0
  25. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/question_answering.cpython-310.pyc +0 -0
  26. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_generation.cpython-310.pyc +0 -0
  27. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_to_audio.cpython-310.pyc +0 -0
  28. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_to_image.cpython-310.pyc +0 -0
  29. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_to_speech.cpython-310.pyc +0 -0
  30. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_to_video.cpython-310.pyc +0 -0
  31. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/token_classification.cpython-310.pyc +0 -0
  32. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/translation.cpython-310.pyc +0 -0
  33. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/video_classification.cpython-310.pyc +0 -0
  34. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/visual_question_answering.cpython-310.pyc +0 -0
  35. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/zero_shot_classification.cpython-310.pyc +0 -0
  36. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/zero_shot_image_classification.cpython-310.pyc +0 -0
  37. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/zero_shot_object_detection.cpython-310.pyc +0 -0
  38. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/audio_classification.py +43 -0
  39. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/automatic_speech_recognition.py +114 -0
  40. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/base.py +161 -0
  41. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/chat_completion.py +311 -0
  42. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/depth_estimation.py +28 -0
  43. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/document_question_answering.py +80 -0
  44. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/feature_extraction.py +36 -0
  45. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/fill_mask.py +47 -0
  46. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/image_classification.py +43 -0
  47. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/image_segmentation.py +51 -0
  48. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/image_to_image.py +56 -0
  49. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/image_to_text.py +101 -0
  50. rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/object_detection.py +58 -0
.gitattributes CHANGED
@@ -5313,3 +5313,15 @@ rtme/lib/python3.10/site-packages/babel/locale-data/sd.dat filter=lfs diff=lfs m
5313
  rtme/lib/python3.10/site-packages/babel/locale-data/tt.dat filter=lfs diff=lfs merge=lfs -text
5314
  rtme/lib/python3.10/site-packages/babel/locale-data/nl.dat filter=lfs diff=lfs merge=lfs -text
5315
  rtme/lib/python3.10/site-packages/babel/locale-data/ro.dat filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
5313
  rtme/lib/python3.10/site-packages/babel/locale-data/tt.dat filter=lfs diff=lfs merge=lfs -text
5314
  rtme/lib/python3.10/site-packages/babel/locale-data/nl.dat filter=lfs diff=lfs merge=lfs -text
5315
  rtme/lib/python3.10/site-packages/babel/locale-data/ro.dat filter=lfs diff=lfs merge=lfs -text
5316
+ rtme/lib/python3.10/site-packages/babel/locale-data/my.dat filter=lfs diff=lfs merge=lfs -text
5317
+ rtme/lib/python3.10/site-packages/babel/locale-data/uk.dat filter=lfs diff=lfs merge=lfs -text
5318
+ rtme/lib/python3.10/site-packages/babel/locale-data/tk.dat filter=lfs diff=lfs merge=lfs -text
5319
+ rtme/lib/python3.10/site-packages/babel/locale-data/yrl.dat filter=lfs diff=lfs merge=lfs -text
5320
+ rtme/lib/python3.10/site-packages/babel/locale-data/xnr.dat filter=lfs diff=lfs merge=lfs -text
5321
+ rtme/lib/python3.10/site-packages/babel/locale-data/sq.dat filter=lfs diff=lfs merge=lfs -text
5322
+ rtme/lib/python3.10/site-packages/babel/locale-data/vec.dat filter=lfs diff=lfs merge=lfs -text
5323
+ rtme/lib/python3.10/site-packages/babel/locale-data/sr.dat filter=lfs diff=lfs merge=lfs -text
5324
+ rtme/lib/python3.10/site-packages/babel/locale-data/yo.dat filter=lfs diff=lfs merge=lfs -text
5325
+ rtme/lib/python3.10/site-packages/babel/locale-data/or.dat filter=lfs diff=lfs merge=lfs -text
5326
+ rtme/lib/python3.10/site-packages/babel/locale-data/zu.dat filter=lfs diff=lfs merge=lfs -text
5327
+ rtme/lib/python3.10/site-packages/babel/locale-data/yue_Hans.dat filter=lfs diff=lfs merge=lfs -text
rtme/lib/python3.10/site-packages/babel/locale-data/my.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5cae4ff6b7254f2811ff6160bf0f487ca359db1c7f64df87b8d78272c0cffa1
3
+ size 183534
rtme/lib/python3.10/site-packages/babel/locale-data/or.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ddcdc2c20be051a6bb590659bca6f421bc629edb34ea8d033524f419ac66a93
3
+ size 226771
rtme/lib/python3.10/site-packages/babel/locale-data/sq.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f254de8f2026fbde22c694ba0e5cbb35048736c6a67eda8b21d3b83b13d6aa89
3
+ size 160229
rtme/lib/python3.10/site-packages/babel/locale-data/sr.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0001372cdfc22d15b396310444861e7597a9c4b2035b310d90be309aef086fa7
3
+ size 265725
rtme/lib/python3.10/site-packages/babel/locale-data/tk.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf98b892c8536ac0c4a2590da6a5e7ce5661ef91206c084bd32953d3fd288a8a
3
+ size 164932
rtme/lib/python3.10/site-packages/babel/locale-data/uk.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fc88486f2dd431abbaed96aa71d5cf6fa7afa7de33463c64ae0563616409c50
3
+ size 339125
rtme/lib/python3.10/site-packages/babel/locale-data/vec.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce890b7ec8132bb7123f829a495f043293e51e23a423ab46deb58cee8eef7003
3
+ size 160413
rtme/lib/python3.10/site-packages/babel/locale-data/xnr.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3add74ce2e05e07e58ab1ea420918f6b2eb9466f866a6d9e27b9003a0a09a09d
3
+ size 142585
rtme/lib/python3.10/site-packages/babel/locale-data/yo.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8962e0fb4f0593d4092d93eea2481b09e5e4c9fc9035aa2fe754d3de2d692a06
3
+ size 110427
rtme/lib/python3.10/site-packages/babel/locale-data/yrl.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da7c03bb0e50fdd2f81f63b19790a5cd9536530d748fe9283f94607e727aef2d
3
+ size 186854
rtme/lib/python3.10/site-packages/babel/locale-data/yue_Hans.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9b4ccf0b53e1fe42e9e1aa72e6090f5b13acddb183093c776587f841bf70169
3
+ size 145194
rtme/lib/python3.10/site-packages/babel/locale-data/zu.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b8f20de8235163911395df21d9d860309fff30af6cb774c923f7c3475b85fc4
3
+ size 138626
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__init__.py ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by `utils/generate_inference_types.py`.
2
+ # Do not modify it manually.
3
+ #
4
+ # ruff: noqa: F401
5
+
6
+ from .audio_classification import (
7
+ AudioClassificationInput,
8
+ AudioClassificationOutputElement,
9
+ AudioClassificationOutputTransform,
10
+ AudioClassificationParameters,
11
+ )
12
+ from .audio_to_audio import AudioToAudioInput, AudioToAudioOutputElement
13
+ from .automatic_speech_recognition import (
14
+ AutomaticSpeechRecognitionEarlyStoppingEnum,
15
+ AutomaticSpeechRecognitionGenerationParameters,
16
+ AutomaticSpeechRecognitionInput,
17
+ AutomaticSpeechRecognitionOutput,
18
+ AutomaticSpeechRecognitionOutputChunk,
19
+ AutomaticSpeechRecognitionParameters,
20
+ )
21
+ from .base import BaseInferenceType
22
+ from .chat_completion import (
23
+ ChatCompletionInput,
24
+ ChatCompletionInputFunctionDefinition,
25
+ ChatCompletionInputFunctionName,
26
+ ChatCompletionInputGrammarType,
27
+ ChatCompletionInputGrammarTypeType,
28
+ ChatCompletionInputMessage,
29
+ ChatCompletionInputMessageChunk,
30
+ ChatCompletionInputMessageChunkType,
31
+ ChatCompletionInputStreamOptions,
32
+ ChatCompletionInputTool,
33
+ ChatCompletionInputToolCall,
34
+ ChatCompletionInputToolChoiceClass,
35
+ ChatCompletionInputToolChoiceEnum,
36
+ ChatCompletionInputURL,
37
+ ChatCompletionOutput,
38
+ ChatCompletionOutputComplete,
39
+ ChatCompletionOutputFunctionDefinition,
40
+ ChatCompletionOutputLogprob,
41
+ ChatCompletionOutputLogprobs,
42
+ ChatCompletionOutputMessage,
43
+ ChatCompletionOutputToolCall,
44
+ ChatCompletionOutputTopLogprob,
45
+ ChatCompletionOutputUsage,
46
+ ChatCompletionStreamOutput,
47
+ ChatCompletionStreamOutputChoice,
48
+ ChatCompletionStreamOutputDelta,
49
+ ChatCompletionStreamOutputDeltaToolCall,
50
+ ChatCompletionStreamOutputFunction,
51
+ ChatCompletionStreamOutputLogprob,
52
+ ChatCompletionStreamOutputLogprobs,
53
+ ChatCompletionStreamOutputTopLogprob,
54
+ ChatCompletionStreamOutputUsage,
55
+ )
56
+ from .depth_estimation import DepthEstimationInput, DepthEstimationOutput
57
+ from .document_question_answering import (
58
+ DocumentQuestionAnsweringInput,
59
+ DocumentQuestionAnsweringInputData,
60
+ DocumentQuestionAnsweringOutputElement,
61
+ DocumentQuestionAnsweringParameters,
62
+ )
63
+ from .feature_extraction import FeatureExtractionInput, FeatureExtractionInputTruncationDirection
64
+ from .fill_mask import FillMaskInput, FillMaskOutputElement, FillMaskParameters
65
+ from .image_classification import (
66
+ ImageClassificationInput,
67
+ ImageClassificationOutputElement,
68
+ ImageClassificationOutputTransform,
69
+ ImageClassificationParameters,
70
+ )
71
+ from .image_segmentation import (
72
+ ImageSegmentationInput,
73
+ ImageSegmentationOutputElement,
74
+ ImageSegmentationParameters,
75
+ ImageSegmentationSubtask,
76
+ )
77
+ from .image_to_image import ImageToImageInput, ImageToImageOutput, ImageToImageParameters, ImageToImageTargetSize
78
+ from .image_to_text import (
79
+ ImageToTextEarlyStoppingEnum,
80
+ ImageToTextGenerationParameters,
81
+ ImageToTextInput,
82
+ ImageToTextOutput,
83
+ ImageToTextParameters,
84
+ )
85
+ from .object_detection import (
86
+ ObjectDetectionBoundingBox,
87
+ ObjectDetectionInput,
88
+ ObjectDetectionOutputElement,
89
+ ObjectDetectionParameters,
90
+ )
91
+ from .question_answering import (
92
+ QuestionAnsweringInput,
93
+ QuestionAnsweringInputData,
94
+ QuestionAnsweringOutputElement,
95
+ QuestionAnsweringParameters,
96
+ )
97
+ from .sentence_similarity import SentenceSimilarityInput, SentenceSimilarityInputData
98
+ from .summarization import (
99
+ SummarizationInput,
100
+ SummarizationOutput,
101
+ SummarizationParameters,
102
+ SummarizationTruncationStrategy,
103
+ )
104
+ from .table_question_answering import (
105
+ Padding,
106
+ TableQuestionAnsweringInput,
107
+ TableQuestionAnsweringInputData,
108
+ TableQuestionAnsweringOutputElement,
109
+ TableQuestionAnsweringParameters,
110
+ )
111
+ from .text2text_generation import (
112
+ Text2TextGenerationInput,
113
+ Text2TextGenerationOutput,
114
+ Text2TextGenerationParameters,
115
+ Text2TextGenerationTruncationStrategy,
116
+ )
117
+ from .text_classification import (
118
+ TextClassificationInput,
119
+ TextClassificationOutputElement,
120
+ TextClassificationOutputTransform,
121
+ TextClassificationParameters,
122
+ )
123
+ from .text_generation import (
124
+ TextGenerationInput,
125
+ TextGenerationInputGenerateParameters,
126
+ TextGenerationInputGrammarType,
127
+ TextGenerationOutput,
128
+ TextGenerationOutputBestOfSequence,
129
+ TextGenerationOutputDetails,
130
+ TextGenerationOutputFinishReason,
131
+ TextGenerationOutputPrefillToken,
132
+ TextGenerationOutputToken,
133
+ TextGenerationStreamOutput,
134
+ TextGenerationStreamOutputStreamDetails,
135
+ TextGenerationStreamOutputToken,
136
+ TypeEnum,
137
+ )
138
+ from .text_to_audio import (
139
+ TextToAudioEarlyStoppingEnum,
140
+ TextToAudioGenerationParameters,
141
+ TextToAudioInput,
142
+ TextToAudioOutput,
143
+ TextToAudioParameters,
144
+ )
145
+ from .text_to_image import TextToImageInput, TextToImageOutput, TextToImageParameters
146
+ from .text_to_speech import (
147
+ TextToSpeechEarlyStoppingEnum,
148
+ TextToSpeechGenerationParameters,
149
+ TextToSpeechInput,
150
+ TextToSpeechOutput,
151
+ TextToSpeechParameters,
152
+ )
153
+ from .text_to_video import TextToVideoInput, TextToVideoOutput, TextToVideoParameters
154
+ from .token_classification import (
155
+ TokenClassificationAggregationStrategy,
156
+ TokenClassificationInput,
157
+ TokenClassificationOutputElement,
158
+ TokenClassificationParameters,
159
+ )
160
+ from .translation import TranslationInput, TranslationOutput, TranslationParameters, TranslationTruncationStrategy
161
+ from .video_classification import (
162
+ VideoClassificationInput,
163
+ VideoClassificationOutputElement,
164
+ VideoClassificationOutputTransform,
165
+ VideoClassificationParameters,
166
+ )
167
+ from .visual_question_answering import (
168
+ VisualQuestionAnsweringInput,
169
+ VisualQuestionAnsweringInputData,
170
+ VisualQuestionAnsweringOutputElement,
171
+ VisualQuestionAnsweringParameters,
172
+ )
173
+ from .zero_shot_classification import (
174
+ ZeroShotClassificationInput,
175
+ ZeroShotClassificationOutputElement,
176
+ ZeroShotClassificationParameters,
177
+ )
178
+ from .zero_shot_image_classification import (
179
+ ZeroShotImageClassificationInput,
180
+ ZeroShotImageClassificationOutputElement,
181
+ ZeroShotImageClassificationParameters,
182
+ )
183
+ from .zero_shot_object_detection import (
184
+ ZeroShotObjectDetectionBoundingBox,
185
+ ZeroShotObjectDetectionInput,
186
+ ZeroShotObjectDetectionOutputElement,
187
+ ZeroShotObjectDetectionParameters,
188
+ )
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (7.18 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/audio_classification.cpython-310.pyc ADDED
Binary file (1.36 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/audio_to_audio.cpython-310.pyc ADDED
Binary file (934 Bytes). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/automatic_speech_recognition.cpython-310.pyc ADDED
Binary file (2.63 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/base.cpython-310.pyc ADDED
Binary file (5.13 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/chat_completion.cpython-310.pyc ADDED
Binary file (8.45 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/depth_estimation.cpython-310.pyc ADDED
Binary file (965 Bytes). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/document_question_answering.cpython-310.pyc ADDED
Binary file (1.98 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/feature_extraction.cpython-310.pyc ADDED
Binary file (1.08 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/fill_mask.cpython-310.pyc ADDED
Binary file (1.35 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/question_answering.cpython-310.pyc ADDED
Binary file (1.8 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_generation.cpython-310.pyc ADDED
Binary file (4.86 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_to_audio.cpython-310.pyc ADDED
Binary file (2.19 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_to_image.cpython-310.pyc ADDED
Binary file (1.41 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_to_speech.cpython-310.pyc ADDED
Binary file (2.16 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/text_to_video.cpython-310.pyc ADDED
Binary file (1.36 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/token_classification.cpython-310.pyc ADDED
Binary file (1.58 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/translation.cpython-310.pyc ADDED
Binary file (1.5 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/video_classification.cpython-310.pyc ADDED
Binary file (1.47 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/visual_question_answering.cpython-310.pyc ADDED
Binary file (1.51 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/zero_shot_classification.cpython-310.pyc ADDED
Binary file (1.3 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/zero_shot_image_classification.cpython-310.pyc ADDED
Binary file (1.3 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/__pycache__/zero_shot_object_detection.cpython-310.pyc ADDED
Binary file (1.63 kB). View file
 
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/audio_classification.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Literal, Optional
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ AudioClassificationOutputTransform = Literal["sigmoid", "softmax", "none"]
12
+
13
+
14
+ @dataclass_with_extra
15
+ class AudioClassificationParameters(BaseInferenceType):
16
+ """Additional inference parameters for Audio Classification"""
17
+
18
+ function_to_apply: Optional["AudioClassificationOutputTransform"] = None
19
+ """The function to apply to the model outputs in order to retrieve the scores."""
20
+ top_k: Optional[int] = None
21
+ """When specified, limits the output to the top K most probable classes."""
22
+
23
+
24
+ @dataclass_with_extra
25
+ class AudioClassificationInput(BaseInferenceType):
26
+ """Inputs for Audio Classification inference"""
27
+
28
+ inputs: str
29
+ """The input audio data as a base64-encoded string. If no `parameters` are provided, you can
30
+ also provide the audio data as a raw bytes payload.
31
+ """
32
+ parameters: Optional[AudioClassificationParameters] = None
33
+ """Additional inference parameters for Audio Classification"""
34
+
35
+
36
+ @dataclass_with_extra
37
+ class AudioClassificationOutputElement(BaseInferenceType):
38
+ """Outputs for Audio Classification inference"""
39
+
40
+ label: str
41
+ """The predicted class label."""
42
+ score: float
43
+ """The corresponding probability."""
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/automatic_speech_recognition.py ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import List, Literal, Optional, Union
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ AutomaticSpeechRecognitionEarlyStoppingEnum = Literal["never"]
12
+
13
+
14
+ @dataclass_with_extra
15
+ class AutomaticSpeechRecognitionGenerationParameters(BaseInferenceType):
16
+ """Parametrization of the text generation process"""
17
+
18
+ do_sample: Optional[bool] = None
19
+ """Whether to use sampling instead of greedy decoding when generating new tokens."""
20
+ early_stopping: Optional[Union[bool, "AutomaticSpeechRecognitionEarlyStoppingEnum"]] = None
21
+ """Controls the stopping condition for beam-based methods."""
22
+ epsilon_cutoff: Optional[float] = None
23
+ """If set to float strictly between 0 and 1, only tokens with a conditional probability
24
+ greater than epsilon_cutoff will be sampled. In the paper, suggested values range from
25
+ 3e-4 to 9e-4, depending on the size of the model. See [Truncation Sampling as Language
26
+ Model Desmoothing](https://hf.co/papers/2210.15191) for more details.
27
+ """
28
+ eta_cutoff: Optional[float] = None
29
+ """Eta sampling is a hybrid of locally typical sampling and epsilon sampling. If set to
30
+ float strictly between 0 and 1, a token is only considered if it is greater than either
31
+ eta_cutoff or sqrt(eta_cutoff) * exp(-entropy(softmax(next_token_logits))). The latter
32
+ term is intuitively the expected next token probability, scaled by sqrt(eta_cutoff). In
33
+ the paper, suggested values range from 3e-4 to 2e-3, depending on the size of the model.
34
+ See [Truncation Sampling as Language Model Desmoothing](https://hf.co/papers/2210.15191)
35
+ for more details.
36
+ """
37
+ max_length: Optional[int] = None
38
+ """The maximum length (in tokens) of the generated text, including the input."""
39
+ max_new_tokens: Optional[int] = None
40
+ """The maximum number of tokens to generate. Takes precedence over max_length."""
41
+ min_length: Optional[int] = None
42
+ """The minimum length (in tokens) of the generated text, including the input."""
43
+ min_new_tokens: Optional[int] = None
44
+ """The minimum number of tokens to generate. Takes precedence over min_length."""
45
+ num_beam_groups: Optional[int] = None
46
+ """Number of groups to divide num_beams into in order to ensure diversity among different
47
+ groups of beams. See [this paper](https://hf.co/papers/1610.02424) for more details.
48
+ """
49
+ num_beams: Optional[int] = None
50
+ """Number of beams to use for beam search."""
51
+ penalty_alpha: Optional[float] = None
52
+ """The value balances the model confidence and the degeneration penalty in contrastive
53
+ search decoding.
54
+ """
55
+ temperature: Optional[float] = None
56
+ """The value used to modulate the next token probabilities."""
57
+ top_k: Optional[int] = None
58
+ """The number of highest probability vocabulary tokens to keep for top-k-filtering."""
59
+ top_p: Optional[float] = None
60
+ """If set to float < 1, only the smallest set of most probable tokens with probabilities
61
+ that add up to top_p or higher are kept for generation.
62
+ """
63
+ typical_p: Optional[float] = None
64
+ """Local typicality measures how similar the conditional probability of predicting a target
65
+ token next is to the expected conditional probability of predicting a random token next,
66
+ given the partial text already generated. If set to float < 1, the smallest set of the
67
+ most locally typical tokens with probabilities that add up to typical_p or higher are
68
+ kept for generation. See [this paper](https://hf.co/papers/2202.00666) for more details.
69
+ """
70
+ use_cache: Optional[bool] = None
71
+ """Whether the model should use the past last key/values attentions to speed up decoding"""
72
+
73
+
74
+ @dataclass_with_extra
75
+ class AutomaticSpeechRecognitionParameters(BaseInferenceType):
76
+ """Additional inference parameters for Automatic Speech Recognition"""
77
+
78
+ return_timestamps: Optional[bool] = None
79
+ """Whether to output corresponding timestamps with the generated text"""
80
+ # Will be deprecated in the future when the renaming to `generation_parameters` is implemented in transformers
81
+ generate_kwargs: Optional[AutomaticSpeechRecognitionGenerationParameters] = None
82
+ """Parametrization of the text generation process"""
83
+
84
+
85
+ @dataclass_with_extra
86
+ class AutomaticSpeechRecognitionInput(BaseInferenceType):
87
+ """Inputs for Automatic Speech Recognition inference"""
88
+
89
+ inputs: str
90
+ """The input audio data as a base64-encoded string. If no `parameters` are provided, you can
91
+ also provide the audio data as a raw bytes payload.
92
+ """
93
+ parameters: Optional[AutomaticSpeechRecognitionParameters] = None
94
+ """Additional inference parameters for Automatic Speech Recognition"""
95
+
96
+
97
+ @dataclass_with_extra
98
+ class AutomaticSpeechRecognitionOutputChunk(BaseInferenceType):
99
+ text: str
100
+ """A chunk of text identified by the model"""
101
+ timestamp: List[float]
102
+ """The start and end timestamps corresponding with the text"""
103
+
104
+
105
+ @dataclass_with_extra
106
+ class AutomaticSpeechRecognitionOutput(BaseInferenceType):
107
+ """Outputs of inference for the Automatic Speech Recognition task"""
108
+
109
+ text: str
110
+ """The recognized text."""
111
+ chunks: Optional[List[AutomaticSpeechRecognitionOutputChunk]] = None
112
+ """When returnTimestamps is enabled, chunks contains a list of audio chunks identified by
113
+ the model.
114
+ """
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/base.py ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2024 The HuggingFace Team. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Contains a base class for all inference types."""
15
+
16
+ import inspect
17
+ import json
18
+ from dataclasses import asdict, dataclass
19
+ from typing import Any, Dict, List, Type, TypeVar, Union, get_args
20
+
21
+
22
+ T = TypeVar("T", bound="BaseInferenceType")
23
+
24
+
25
+ def _repr_with_extra(self):
26
+ fields = list(self.__dataclass_fields__.keys())
27
+ other_fields = list(k for k in self.__dict__ if k not in fields)
28
+ return f"{self.__class__.__name__}({', '.join(f'{k}={self.__dict__[k]!r}' for k in fields + other_fields)})"
29
+
30
+
31
+ def dataclass_with_extra(cls: Type[T]) -> Type[T]:
32
+ """Decorator to add a custom __repr__ method to a dataclass, showing all fields, including extra ones.
33
+
34
+ This decorator only works with dataclasses that inherit from `BaseInferenceType`.
35
+ """
36
+ cls = dataclass(cls)
37
+ cls.__repr__ = _repr_with_extra # type: ignore[method-assign]
38
+ return cls
39
+
40
+
41
+ @dataclass
42
+ class BaseInferenceType(dict):
43
+ """Base class for all inference types.
44
+
45
+ Object is a dataclass and a dict for backward compatibility but plan is to remove the dict part in the future.
46
+
47
+ Handle parsing from dict, list and json strings in a permissive way to ensure future-compatibility (e.g. all fields
48
+ are made optional, and non-expected fields are added as dict attributes).
49
+ """
50
+
51
+ @classmethod
52
+ def parse_obj_as_list(cls: Type[T], data: Union[bytes, str, List, Dict]) -> List[T]:
53
+ """Alias to parse server response and return a single instance.
54
+
55
+ See `parse_obj` for more details.
56
+ """
57
+ output = cls.parse_obj(data)
58
+ if not isinstance(output, list):
59
+ raise ValueError(f"Invalid input data for {cls}. Expected a list, but got {type(output)}.")
60
+ return output
61
+
62
+ @classmethod
63
+ def parse_obj_as_instance(cls: Type[T], data: Union[bytes, str, List, Dict]) -> T:
64
+ """Alias to parse server response and return a single instance.
65
+
66
+ See `parse_obj` for more details.
67
+ """
68
+ output = cls.parse_obj(data)
69
+ if isinstance(output, list):
70
+ raise ValueError(f"Invalid input data for {cls}. Expected a single instance, but got a list.")
71
+ return output
72
+
73
+ @classmethod
74
+ def parse_obj(cls: Type[T], data: Union[bytes, str, List, Dict]) -> Union[List[T], T]:
75
+ """Parse server response as a dataclass or list of dataclasses.
76
+
77
+ To enable future-compatibility, we want to handle cases where the server return more fields than expected.
78
+ In such cases, we don't want to raise an error but still create the dataclass object. Remaining fields are
79
+ added as dict attributes.
80
+ """
81
+ # Parse server response (from bytes)
82
+ if isinstance(data, bytes):
83
+ data = data.decode()
84
+ if isinstance(data, str):
85
+ data = json.loads(data)
86
+
87
+ # If a list, parse each item individually
88
+ if isinstance(data, List):
89
+ return [cls.parse_obj(d) for d in data] # type: ignore [misc]
90
+
91
+ # At this point, we expect a dict
92
+ if not isinstance(data, dict):
93
+ raise ValueError(f"Invalid data type: {type(data)}")
94
+
95
+ init_values = {}
96
+ other_values = {}
97
+ for key, value in data.items():
98
+ key = normalize_key(key)
99
+ if key in cls.__dataclass_fields__ and cls.__dataclass_fields__[key].init:
100
+ if isinstance(value, dict) or isinstance(value, list):
101
+ field_type = cls.__dataclass_fields__[key].type
102
+
103
+ # if `field_type` is a `BaseInferenceType`, parse it
104
+ if inspect.isclass(field_type) and issubclass(field_type, BaseInferenceType):
105
+ value = field_type.parse_obj(value)
106
+
107
+ # otherwise, recursively parse nested dataclasses (if possible)
108
+ # `get_args` returns handle Union and Optional for us
109
+ else:
110
+ expected_types = get_args(field_type)
111
+ for expected_type in expected_types:
112
+ if getattr(expected_type, "_name", None) == "List":
113
+ expected_type = get_args(expected_type)[
114
+ 0
115
+ ] # assume same type for all items in the list
116
+ if inspect.isclass(expected_type) and issubclass(expected_type, BaseInferenceType):
117
+ value = expected_type.parse_obj(value)
118
+ break
119
+ init_values[key] = value
120
+ else:
121
+ other_values[key] = value
122
+
123
+ # Make all missing fields default to None
124
+ # => ensure that dataclass initialization will never fail even if the server does not return all fields.
125
+ for key in cls.__dataclass_fields__:
126
+ if key not in init_values:
127
+ init_values[key] = None
128
+
129
+ # Initialize dataclass with expected values
130
+ item = cls(**init_values)
131
+
132
+ # Add remaining fields as dict attributes
133
+ item.update(other_values)
134
+
135
+ # Add remaining fields as extra dataclass fields.
136
+ # They won't be part of the dataclass fields but will be accessible as attributes.
137
+ # Use @dataclass_with_extra to show them in __repr__.
138
+ item.__dict__.update(other_values)
139
+ return item
140
+
141
+ def __post_init__(self):
142
+ self.update(asdict(self))
143
+
144
+ def __setitem__(self, __key: Any, __value: Any) -> None:
145
+ # Hacky way to keep dataclass values in sync when dict is updated
146
+ super().__setitem__(__key, __value)
147
+ if __key in self.__dataclass_fields__ and getattr(self, __key, None) != __value:
148
+ self.__setattr__(__key, __value)
149
+ return
150
+
151
+ def __setattr__(self, __name: str, __value: Any) -> None:
152
+ # Hacky way to keep dict values is sync when dataclass is updated
153
+ super().__setattr__(__name, __value)
154
+ if self.get(__name) != __value:
155
+ self[__name] = __value
156
+ return
157
+
158
+
159
+ def normalize_key(key: str) -> str:
160
+ # e.g "content-type" -> "content_type", "Accept" -> "accept"
161
+ return key.replace("-", "_").replace(" ", "_").lower()
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/chat_completion.py ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Any, List, Literal, Optional, Union
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ @dataclass_with_extra
12
+ class ChatCompletionInputURL(BaseInferenceType):
13
+ url: str
14
+
15
+
16
+ ChatCompletionInputMessageChunkType = Literal["text", "image_url"]
17
+
18
+
19
+ @dataclass_with_extra
20
+ class ChatCompletionInputMessageChunk(BaseInferenceType):
21
+ type: "ChatCompletionInputMessageChunkType"
22
+ image_url: Optional[ChatCompletionInputURL] = None
23
+ text: Optional[str] = None
24
+
25
+
26
+ @dataclass_with_extra
27
+ class ChatCompletionInputFunctionDefinition(BaseInferenceType):
28
+ arguments: Any
29
+ name: str
30
+ description: Optional[str] = None
31
+
32
+
33
+ @dataclass_with_extra
34
+ class ChatCompletionInputToolCall(BaseInferenceType):
35
+ function: ChatCompletionInputFunctionDefinition
36
+ id: str
37
+ type: str
38
+
39
+
40
+ @dataclass_with_extra
41
+ class ChatCompletionInputMessage(BaseInferenceType):
42
+ role: str
43
+ content: Optional[Union[List[ChatCompletionInputMessageChunk], str]] = None
44
+ name: Optional[str] = None
45
+ tool_calls: Optional[List[ChatCompletionInputToolCall]] = None
46
+
47
+
48
+ ChatCompletionInputGrammarTypeType = Literal["json", "regex"]
49
+
50
+
51
+ @dataclass_with_extra
52
+ class ChatCompletionInputGrammarType(BaseInferenceType):
53
+ type: "ChatCompletionInputGrammarTypeType"
54
+ value: Any
55
+ """A string that represents a [JSON Schema](https://json-schema.org/).
56
+ JSON Schema is a declarative language that allows to annotate JSON documents
57
+ with types and descriptions.
58
+ """
59
+
60
+
61
+ @dataclass_with_extra
62
+ class ChatCompletionInputStreamOptions(BaseInferenceType):
63
+ include_usage: Optional[bool] = None
64
+ """If set, an additional chunk will be streamed before the data: [DONE] message. The usage
65
+ field on this chunk shows the token usage statistics for the entire request, and the
66
+ choices field will always be an empty array. All other chunks will also include a usage
67
+ field, but with a null value.
68
+ """
69
+
70
+
71
+ @dataclass_with_extra
72
+ class ChatCompletionInputFunctionName(BaseInferenceType):
73
+ name: str
74
+
75
+
76
+ @dataclass_with_extra
77
+ class ChatCompletionInputToolChoiceClass(BaseInferenceType):
78
+ function: ChatCompletionInputFunctionName
79
+
80
+
81
+ ChatCompletionInputToolChoiceEnum = Literal["auto", "none", "required"]
82
+
83
+
84
+ @dataclass_with_extra
85
+ class ChatCompletionInputTool(BaseInferenceType):
86
+ function: ChatCompletionInputFunctionDefinition
87
+ type: str
88
+
89
+
90
+ @dataclass_with_extra
91
+ class ChatCompletionInput(BaseInferenceType):
92
+ """Chat Completion Input.
93
+ Auto-generated from TGI specs.
94
+ For more details, check out
95
+ https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
96
+ """
97
+
98
+ messages: List[ChatCompletionInputMessage]
99
+ """A list of messages comprising the conversation so far."""
100
+ frequency_penalty: Optional[float] = None
101
+ """Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing
102
+ frequency in the text so far,
103
+ decreasing the model's likelihood to repeat the same line verbatim.
104
+ """
105
+ logit_bias: Optional[List[float]] = None
106
+ """UNUSED
107
+ Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON
108
+ object that maps tokens
109
+ (specified by their token ID in the tokenizer) to an associated bias value from -100 to
110
+ 100. Mathematically,
111
+ the bias is added to the logits generated by the model prior to sampling. The exact
112
+ effect will vary per model,
113
+ but values between -1 and 1 should decrease or increase likelihood of selection; values
114
+ like -100 or 100 should
115
+ result in a ban or exclusive selection of the relevant token.
116
+ """
117
+ logprobs: Optional[bool] = None
118
+ """Whether to return log probabilities of the output tokens or not. If true, returns the log
119
+ probabilities of each
120
+ output token returned in the content of message.
121
+ """
122
+ max_tokens: Optional[int] = None
123
+ """The maximum number of tokens that can be generated in the chat completion."""
124
+ model: Optional[str] = None
125
+ """[UNUSED] ID of the model to use. See the model endpoint compatibility table for details
126
+ on which models work with the Chat API.
127
+ """
128
+ n: Optional[int] = None
129
+ """UNUSED
130
+ How many chat completion choices to generate for each input message. Note that you will
131
+ be charged based on the
132
+ number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
133
+ """
134
+ presence_penalty: Optional[float] = None
135
+ """Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they
136
+ appear in the text so far,
137
+ increasing the model's likelihood to talk about new topics
138
+ """
139
+ response_format: Optional[ChatCompletionInputGrammarType] = None
140
+ seed: Optional[int] = None
141
+ stop: Optional[List[str]] = None
142
+ """Up to 4 sequences where the API will stop generating further tokens."""
143
+ stream: Optional[bool] = None
144
+ stream_options: Optional[ChatCompletionInputStreamOptions] = None
145
+ temperature: Optional[float] = None
146
+ """What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the
147
+ output more random, while
148
+ lower values like 0.2 will make it more focused and deterministic.
149
+ We generally recommend altering this or `top_p` but not both.
150
+ """
151
+ tool_choice: Optional[Union[ChatCompletionInputToolChoiceClass, "ChatCompletionInputToolChoiceEnum"]] = None
152
+ tool_prompt: Optional[str] = None
153
+ """A prompt to be appended before the tools"""
154
+ tools: Optional[List[ChatCompletionInputTool]] = None
155
+ """A list of tools the model may call. Currently, only functions are supported as a tool.
156
+ Use this to provide a list of
157
+ functions the model may generate JSON inputs for.
158
+ """
159
+ top_logprobs: Optional[int] = None
160
+ """An integer between 0 and 5 specifying the number of most likely tokens to return at each
161
+ token position, each with
162
+ an associated log probability. logprobs must be set to true if this parameter is used.
163
+ """
164
+ top_p: Optional[float] = None
165
+ """An alternative to sampling with temperature, called nucleus sampling, where the model
166
+ considers the results of the
167
+ tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10%
168
+ probability mass are considered.
169
+ """
170
+
171
+
172
+ @dataclass_with_extra
173
+ class ChatCompletionOutputTopLogprob(BaseInferenceType):
174
+ logprob: float
175
+ token: str
176
+
177
+
178
+ @dataclass_with_extra
179
+ class ChatCompletionOutputLogprob(BaseInferenceType):
180
+ logprob: float
181
+ token: str
182
+ top_logprobs: List[ChatCompletionOutputTopLogprob]
183
+
184
+
185
+ @dataclass_with_extra
186
+ class ChatCompletionOutputLogprobs(BaseInferenceType):
187
+ content: List[ChatCompletionOutputLogprob]
188
+
189
+
190
+ @dataclass_with_extra
191
+ class ChatCompletionOutputFunctionDefinition(BaseInferenceType):
192
+ arguments: Any
193
+ name: str
194
+ description: Optional[str] = None
195
+
196
+
197
+ @dataclass_with_extra
198
+ class ChatCompletionOutputToolCall(BaseInferenceType):
199
+ function: ChatCompletionOutputFunctionDefinition
200
+ id: str
201
+ type: str
202
+
203
+
204
+ @dataclass_with_extra
205
+ class ChatCompletionOutputMessage(BaseInferenceType):
206
+ role: str
207
+ content: Optional[str] = None
208
+ tool_call_id: Optional[str] = None
209
+ tool_calls: Optional[List[ChatCompletionOutputToolCall]] = None
210
+
211
+
212
+ @dataclass_with_extra
213
+ class ChatCompletionOutputComplete(BaseInferenceType):
214
+ finish_reason: str
215
+ index: int
216
+ message: ChatCompletionOutputMessage
217
+ logprobs: Optional[ChatCompletionOutputLogprobs] = None
218
+
219
+
220
+ @dataclass_with_extra
221
+ class ChatCompletionOutputUsage(BaseInferenceType):
222
+ completion_tokens: int
223
+ prompt_tokens: int
224
+ total_tokens: int
225
+
226
+
227
+ @dataclass_with_extra
228
+ class ChatCompletionOutput(BaseInferenceType):
229
+ """Chat Completion Output.
230
+ Auto-generated from TGI specs.
231
+ For more details, check out
232
+ https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
233
+ """
234
+
235
+ choices: List[ChatCompletionOutputComplete]
236
+ created: int
237
+ id: str
238
+ model: str
239
+ system_fingerprint: str
240
+ usage: ChatCompletionOutputUsage
241
+
242
+
243
+ @dataclass_with_extra
244
+ class ChatCompletionStreamOutputFunction(BaseInferenceType):
245
+ arguments: str
246
+ name: Optional[str] = None
247
+
248
+
249
+ @dataclass_with_extra
250
+ class ChatCompletionStreamOutputDeltaToolCall(BaseInferenceType):
251
+ function: ChatCompletionStreamOutputFunction
252
+ id: str
253
+ index: int
254
+ type: str
255
+
256
+
257
+ @dataclass_with_extra
258
+ class ChatCompletionStreamOutputDelta(BaseInferenceType):
259
+ role: str
260
+ content: Optional[str] = None
261
+ tool_call_id: Optional[str] = None
262
+ tool_calls: Optional[List[ChatCompletionStreamOutputDeltaToolCall]] = None
263
+
264
+
265
+ @dataclass_with_extra
266
+ class ChatCompletionStreamOutputTopLogprob(BaseInferenceType):
267
+ logprob: float
268
+ token: str
269
+
270
+
271
+ @dataclass_with_extra
272
+ class ChatCompletionStreamOutputLogprob(BaseInferenceType):
273
+ logprob: float
274
+ token: str
275
+ top_logprobs: List[ChatCompletionStreamOutputTopLogprob]
276
+
277
+
278
+ @dataclass_with_extra
279
+ class ChatCompletionStreamOutputLogprobs(BaseInferenceType):
280
+ content: List[ChatCompletionStreamOutputLogprob]
281
+
282
+
283
+ @dataclass_with_extra
284
+ class ChatCompletionStreamOutputChoice(BaseInferenceType):
285
+ delta: ChatCompletionStreamOutputDelta
286
+ index: int
287
+ finish_reason: Optional[str] = None
288
+ logprobs: Optional[ChatCompletionStreamOutputLogprobs] = None
289
+
290
+
291
+ @dataclass_with_extra
292
+ class ChatCompletionStreamOutputUsage(BaseInferenceType):
293
+ completion_tokens: int
294
+ prompt_tokens: int
295
+ total_tokens: int
296
+
297
+
298
+ @dataclass_with_extra
299
+ class ChatCompletionStreamOutput(BaseInferenceType):
300
+ """Chat Completion Stream Output.
301
+ Auto-generated from TGI specs.
302
+ For more details, check out
303
+ https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
304
+ """
305
+
306
+ choices: List[ChatCompletionStreamOutputChoice]
307
+ created: int
308
+ id: str
309
+ model: str
310
+ system_fingerprint: str
311
+ usage: Optional[ChatCompletionStreamOutputUsage] = None
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/depth_estimation.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Any, Dict, Optional
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ @dataclass_with_extra
12
+ class DepthEstimationInput(BaseInferenceType):
13
+ """Inputs for Depth Estimation inference"""
14
+
15
+ inputs: Any
16
+ """The input image data"""
17
+ parameters: Optional[Dict[str, Any]] = None
18
+ """Additional inference parameters for Depth Estimation"""
19
+
20
+
21
+ @dataclass_with_extra
22
+ class DepthEstimationOutput(BaseInferenceType):
23
+ """Outputs of inference for the Depth Estimation task"""
24
+
25
+ depth: Any
26
+ """The predicted depth as an image"""
27
+ predicted_depth: Any
28
+ """The predicted depth as a tensor"""
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/document_question_answering.py ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Any, List, Optional, Union
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ @dataclass_with_extra
12
+ class DocumentQuestionAnsweringInputData(BaseInferenceType):
13
+ """One (document, question) pair to answer"""
14
+
15
+ image: Any
16
+ """The image on which the question is asked"""
17
+ question: str
18
+ """A question to ask of the document"""
19
+
20
+
21
+ @dataclass_with_extra
22
+ class DocumentQuestionAnsweringParameters(BaseInferenceType):
23
+ """Additional inference parameters for Document Question Answering"""
24
+
25
+ doc_stride: Optional[int] = None
26
+ """If the words in the document are too long to fit with the question for the model, it will
27
+ be split in several chunks with some overlap. This argument controls the size of that
28
+ overlap.
29
+ """
30
+ handle_impossible_answer: Optional[bool] = None
31
+ """Whether to accept impossible as an answer"""
32
+ lang: Optional[str] = None
33
+ """Language to use while running OCR. Defaults to english."""
34
+ max_answer_len: Optional[int] = None
35
+ """The maximum length of predicted answers (e.g., only answers with a shorter length are
36
+ considered).
37
+ """
38
+ max_question_len: Optional[int] = None
39
+ """The maximum length of the question after tokenization. It will be truncated if needed."""
40
+ max_seq_len: Optional[int] = None
41
+ """The maximum length of the total sentence (context + question) in tokens of each chunk
42
+ passed to the model. The context will be split in several chunks (using doc_stride as
43
+ overlap) if needed.
44
+ """
45
+ top_k: Optional[int] = None
46
+ """The number of answers to return (will be chosen by order of likelihood). Can return less
47
+ than top_k answers if there are not enough options available within the context.
48
+ """
49
+ word_boxes: Optional[List[Union[List[float], str]]] = None
50
+ """A list of words and bounding boxes (normalized 0->1000). If provided, the inference will
51
+ skip the OCR step and use the provided bounding boxes instead.
52
+ """
53
+
54
+
55
+ @dataclass_with_extra
56
+ class DocumentQuestionAnsweringInput(BaseInferenceType):
57
+ """Inputs for Document Question Answering inference"""
58
+
59
+ inputs: DocumentQuestionAnsweringInputData
60
+ """One (document, question) pair to answer"""
61
+ parameters: Optional[DocumentQuestionAnsweringParameters] = None
62
+ """Additional inference parameters for Document Question Answering"""
63
+
64
+
65
+ @dataclass_with_extra
66
+ class DocumentQuestionAnsweringOutputElement(BaseInferenceType):
67
+ """Outputs of inference for the Document Question Answering task"""
68
+
69
+ answer: str
70
+ """The answer to the question."""
71
+ end: int
72
+ """The end word index of the answer (in the OCR’d version of the input or provided word
73
+ boxes).
74
+ """
75
+ score: float
76
+ """The probability associated to the answer."""
77
+ start: int
78
+ """The start word index of the answer (in the OCR’d version of the input or provided word
79
+ boxes).
80
+ """
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/feature_extraction.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import List, Literal, Optional, Union
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ FeatureExtractionInputTruncationDirection = Literal["Left", "Right"]
12
+
13
+
14
+ @dataclass_with_extra
15
+ class FeatureExtractionInput(BaseInferenceType):
16
+ """Feature Extraction Input.
17
+ Auto-generated from TEI specs.
18
+ For more details, check out
19
+ https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tei-import.ts.
20
+ """
21
+
22
+ inputs: Union[List[str], str]
23
+ """The text or list of texts to embed."""
24
+ normalize: Optional[bool] = None
25
+ prompt_name: Optional[str] = None
26
+ """The name of the prompt that should be used by for encoding. If not set, no prompt
27
+ will be applied.
28
+ Must be a key in the `sentence-transformers` configuration `prompts` dictionary.
29
+ For example if ``prompt_name`` is "query" and the ``prompts`` is {"query": "query: ",
30
+ ...},
31
+ then the sentence "What is the capital of France?" will be encoded as
32
+ "query: What is the capital of France?" because the prompt text will be prepended before
33
+ any text to encode.
34
+ """
35
+ truncate: Optional[bool] = None
36
+ truncation_direction: Optional["FeatureExtractionInputTruncationDirection"] = None
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/fill_mask.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Any, List, Optional
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ @dataclass_with_extra
12
+ class FillMaskParameters(BaseInferenceType):
13
+ """Additional inference parameters for Fill Mask"""
14
+
15
+ targets: Optional[List[str]] = None
16
+ """When passed, the model will limit the scores to the passed targets instead of looking up
17
+ in the whole vocabulary. If the provided targets are not in the model vocab, they will be
18
+ tokenized and the first resulting token will be used (with a warning, and that might be
19
+ slower).
20
+ """
21
+ top_k: Optional[int] = None
22
+ """When passed, overrides the number of predictions to return."""
23
+
24
+
25
+ @dataclass_with_extra
26
+ class FillMaskInput(BaseInferenceType):
27
+ """Inputs for Fill Mask inference"""
28
+
29
+ inputs: str
30
+ """The text with masked tokens"""
31
+ parameters: Optional[FillMaskParameters] = None
32
+ """Additional inference parameters for Fill Mask"""
33
+
34
+
35
+ @dataclass_with_extra
36
+ class FillMaskOutputElement(BaseInferenceType):
37
+ """Outputs of inference for the Fill Mask task"""
38
+
39
+ score: float
40
+ """The corresponding probability"""
41
+ sequence: str
42
+ """The corresponding input with the mask token prediction."""
43
+ token: int
44
+ """The predicted token id (to replace the masked one)."""
45
+ token_str: Any
46
+ fill_mask_output_token_str: Optional[str] = None
47
+ """The predicted token (to replace the masked one)."""
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/image_classification.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Literal, Optional
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ ImageClassificationOutputTransform = Literal["sigmoid", "softmax", "none"]
12
+
13
+
14
+ @dataclass_with_extra
15
+ class ImageClassificationParameters(BaseInferenceType):
16
+ """Additional inference parameters for Image Classification"""
17
+
18
+ function_to_apply: Optional["ImageClassificationOutputTransform"] = None
19
+ """The function to apply to the model outputs in order to retrieve the scores."""
20
+ top_k: Optional[int] = None
21
+ """When specified, limits the output to the top K most probable classes."""
22
+
23
+
24
+ @dataclass_with_extra
25
+ class ImageClassificationInput(BaseInferenceType):
26
+ """Inputs for Image Classification inference"""
27
+
28
+ inputs: str
29
+ """The input image data as a base64-encoded string. If no `parameters` are provided, you can
30
+ also provide the image data as a raw bytes payload.
31
+ """
32
+ parameters: Optional[ImageClassificationParameters] = None
33
+ """Additional inference parameters for Image Classification"""
34
+
35
+
36
+ @dataclass_with_extra
37
+ class ImageClassificationOutputElement(BaseInferenceType):
38
+ """Outputs of inference for the Image Classification task"""
39
+
40
+ label: str
41
+ """The predicted class label."""
42
+ score: float
43
+ """The corresponding probability."""
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/image_segmentation.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Literal, Optional
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ ImageSegmentationSubtask = Literal["instance", "panoptic", "semantic"]
12
+
13
+
14
+ @dataclass_with_extra
15
+ class ImageSegmentationParameters(BaseInferenceType):
16
+ """Additional inference parameters for Image Segmentation"""
17
+
18
+ mask_threshold: Optional[float] = None
19
+ """Threshold to use when turning the predicted masks into binary values."""
20
+ overlap_mask_area_threshold: Optional[float] = None
21
+ """Mask overlap threshold to eliminate small, disconnected segments."""
22
+ subtask: Optional["ImageSegmentationSubtask"] = None
23
+ """Segmentation task to be performed, depending on model capabilities."""
24
+ threshold: Optional[float] = None
25
+ """Probability threshold to filter out predicted masks."""
26
+
27
+
28
+ @dataclass_with_extra
29
+ class ImageSegmentationInput(BaseInferenceType):
30
+ """Inputs for Image Segmentation inference"""
31
+
32
+ inputs: str
33
+ """The input image data as a base64-encoded string. If no `parameters` are provided, you can
34
+ also provide the image data as a raw bytes payload.
35
+ """
36
+ parameters: Optional[ImageSegmentationParameters] = None
37
+ """Additional inference parameters for Image Segmentation"""
38
+
39
+
40
+ @dataclass_with_extra
41
+ class ImageSegmentationOutputElement(BaseInferenceType):
42
+ """Outputs of inference for the Image Segmentation task
43
+ A predicted mask / segment
44
+ """
45
+
46
+ label: str
47
+ """The label of the predicted segment."""
48
+ mask: str
49
+ """The corresponding mask as a black-and-white image (base64-encoded)."""
50
+ score: Optional[float] = None
51
+ """The score or confidence degree the model has."""
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/image_to_image.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Any, Optional
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ @dataclass_with_extra
12
+ class ImageToImageTargetSize(BaseInferenceType):
13
+ """The size in pixel of the output image."""
14
+
15
+ height: int
16
+ width: int
17
+
18
+
19
+ @dataclass_with_extra
20
+ class ImageToImageParameters(BaseInferenceType):
21
+ """Additional inference parameters for Image To Image"""
22
+
23
+ guidance_scale: Optional[float] = None
24
+ """For diffusion models. A higher guidance scale value encourages the model to generate
25
+ images closely linked to the text prompt at the expense of lower image quality.
26
+ """
27
+ negative_prompt: Optional[str] = None
28
+ """One prompt to guide what NOT to include in image generation."""
29
+ num_inference_steps: Optional[int] = None
30
+ """For diffusion models. The number of denoising steps. More denoising steps usually lead to
31
+ a higher quality image at the expense of slower inference.
32
+ """
33
+ prompt: Optional[str] = None
34
+ """The text prompt to guide the image generation."""
35
+ target_size: Optional[ImageToImageTargetSize] = None
36
+ """The size in pixel of the output image."""
37
+
38
+
39
+ @dataclass_with_extra
40
+ class ImageToImageInput(BaseInferenceType):
41
+ """Inputs for Image To Image inference"""
42
+
43
+ inputs: str
44
+ """The input image data as a base64-encoded string. If no `parameters` are provided, you can
45
+ also provide the image data as a raw bytes payload.
46
+ """
47
+ parameters: Optional[ImageToImageParameters] = None
48
+ """Additional inference parameters for Image To Image"""
49
+
50
+
51
+ @dataclass_with_extra
52
+ class ImageToImageOutput(BaseInferenceType):
53
+ """Outputs of inference for the Image To Image task"""
54
+
55
+ image: Any
56
+ """The output image returned as raw bytes in the payload."""
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/image_to_text.py ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Any, Literal, Optional, Union
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ ImageToTextEarlyStoppingEnum = Literal["never"]
12
+
13
+
14
+ @dataclass_with_extra
15
+ class ImageToTextGenerationParameters(BaseInferenceType):
16
+ """Parametrization of the text generation process"""
17
+
18
+ do_sample: Optional[bool] = None
19
+ """Whether to use sampling instead of greedy decoding when generating new tokens."""
20
+ early_stopping: Optional[Union[bool, "ImageToTextEarlyStoppingEnum"]] = None
21
+ """Controls the stopping condition for beam-based methods."""
22
+ epsilon_cutoff: Optional[float] = None
23
+ """If set to float strictly between 0 and 1, only tokens with a conditional probability
24
+ greater than epsilon_cutoff will be sampled. In the paper, suggested values range from
25
+ 3e-4 to 9e-4, depending on the size of the model. See [Truncation Sampling as Language
26
+ Model Desmoothing](https://hf.co/papers/2210.15191) for more details.
27
+ """
28
+ eta_cutoff: Optional[float] = None
29
+ """Eta sampling is a hybrid of locally typical sampling and epsilon sampling. If set to
30
+ float strictly between 0 and 1, a token is only considered if it is greater than either
31
+ eta_cutoff or sqrt(eta_cutoff) * exp(-entropy(softmax(next_token_logits))). The latter
32
+ term is intuitively the expected next token probability, scaled by sqrt(eta_cutoff). In
33
+ the paper, suggested values range from 3e-4 to 2e-3, depending on the size of the model.
34
+ See [Truncation Sampling as Language Model Desmoothing](https://hf.co/papers/2210.15191)
35
+ for more details.
36
+ """
37
+ max_length: Optional[int] = None
38
+ """The maximum length (in tokens) of the generated text, including the input."""
39
+ max_new_tokens: Optional[int] = None
40
+ """The maximum number of tokens to generate. Takes precedence over max_length."""
41
+ min_length: Optional[int] = None
42
+ """The minimum length (in tokens) of the generated text, including the input."""
43
+ min_new_tokens: Optional[int] = None
44
+ """The minimum number of tokens to generate. Takes precedence over min_length."""
45
+ num_beam_groups: Optional[int] = None
46
+ """Number of groups to divide num_beams into in order to ensure diversity among different
47
+ groups of beams. See [this paper](https://hf.co/papers/1610.02424) for more details.
48
+ """
49
+ num_beams: Optional[int] = None
50
+ """Number of beams to use for beam search."""
51
+ penalty_alpha: Optional[float] = None
52
+ """The value balances the model confidence and the degeneration penalty in contrastive
53
+ search decoding.
54
+ """
55
+ temperature: Optional[float] = None
56
+ """The value used to modulate the next token probabilities."""
57
+ top_k: Optional[int] = None
58
+ """The number of highest probability vocabulary tokens to keep for top-k-filtering."""
59
+ top_p: Optional[float] = None
60
+ """If set to float < 1, only the smallest set of most probable tokens with probabilities
61
+ that add up to top_p or higher are kept for generation.
62
+ """
63
+ typical_p: Optional[float] = None
64
+ """Local typicality measures how similar the conditional probability of predicting a target
65
+ token next is to the expected conditional probability of predicting a random token next,
66
+ given the partial text already generated. If set to float < 1, the smallest set of the
67
+ most locally typical tokens with probabilities that add up to typical_p or higher are
68
+ kept for generation. See [this paper](https://hf.co/papers/2202.00666) for more details.
69
+ """
70
+ use_cache: Optional[bool] = None
71
+ """Whether the model should use the past last key/values attentions to speed up decoding"""
72
+
73
+
74
+ @dataclass_with_extra
75
+ class ImageToTextParameters(BaseInferenceType):
76
+ """Additional inference parameters for Image To Text"""
77
+
78
+ max_new_tokens: Optional[int] = None
79
+ """The amount of maximum tokens to generate."""
80
+ # Will be deprecated in the future when the renaming to `generation_parameters` is implemented in transformers
81
+ generate_kwargs: Optional[ImageToTextGenerationParameters] = None
82
+ """Parametrization of the text generation process"""
83
+
84
+
85
+ @dataclass_with_extra
86
+ class ImageToTextInput(BaseInferenceType):
87
+ """Inputs for Image To Text inference"""
88
+
89
+ inputs: Any
90
+ """The input image data"""
91
+ parameters: Optional[ImageToTextParameters] = None
92
+ """Additional inference parameters for Image To Text"""
93
+
94
+
95
+ @dataclass_with_extra
96
+ class ImageToTextOutput(BaseInferenceType):
97
+ """Outputs of inference for the Image To Text task"""
98
+
99
+ generated_text: Any
100
+ image_to_text_output_generated_text: Optional[str] = None
101
+ """The generated text."""
rtme/lib/python3.10/site-packages/huggingface_hub/inference/_generated/types/object_detection.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference code generated from the JSON schema spec in @huggingface/tasks.
2
+ #
3
+ # See:
4
+ # - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
5
+ # - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
6
+ from typing import Optional
7
+
8
+ from .base import BaseInferenceType, dataclass_with_extra
9
+
10
+
11
+ @dataclass_with_extra
12
+ class ObjectDetectionParameters(BaseInferenceType):
13
+ """Additional inference parameters for Object Detection"""
14
+
15
+ threshold: Optional[float] = None
16
+ """The probability necessary to make a prediction."""
17
+
18
+
19
+ @dataclass_with_extra
20
+ class ObjectDetectionInput(BaseInferenceType):
21
+ """Inputs for Object Detection inference"""
22
+
23
+ inputs: str
24
+ """The input image data as a base64-encoded string. If no `parameters` are provided, you can
25
+ also provide the image data as a raw bytes payload.
26
+ """
27
+ parameters: Optional[ObjectDetectionParameters] = None
28
+ """Additional inference parameters for Object Detection"""
29
+
30
+
31
+ @dataclass_with_extra
32
+ class ObjectDetectionBoundingBox(BaseInferenceType):
33
+ """The predicted bounding box. Coordinates are relative to the top left corner of the input
34
+ image.
35
+ """
36
+
37
+ xmax: int
38
+ """The x-coordinate of the bottom-right corner of the bounding box."""
39
+ xmin: int
40
+ """The x-coordinate of the top-left corner of the bounding box."""
41
+ ymax: int
42
+ """The y-coordinate of the bottom-right corner of the bounding box."""
43
+ ymin: int
44
+ """The y-coordinate of the top-left corner of the bounding box."""
45
+
46
+
47
+ @dataclass_with_extra
48
+ class ObjectDetectionOutputElement(BaseInferenceType):
49
+ """Outputs of inference for the Object Detection task"""
50
+
51
+ box: ObjectDetectionBoundingBox
52
+ """The predicted bounding box. Coordinates are relative to the top left corner of the input
53
+ image.
54
+ """
55
+ label: str
56
+ """The predicted label for the bounding box."""
57
+ score: float
58
+ """The associated score / probability."""