Expose MediaPipe Tasks Audio and Text APIs in MediaPipe PyPI packages.

PiperOrigin-RevId: 486777537
This commit is contained in:
Jiuqiang Tang 2022-11-07 15:15:58 -08:00 committed by Copybara-Service
parent 63a759accc
commit 571c0b1fef
3 changed files with 27 additions and 0 deletions

View File

@ -14,8 +14,10 @@
"""MediaPipe Tasks API.""" """MediaPipe Tasks API."""
from . import audio
from . import components from . import components
from . import core from . import core
from . import text
from . import vision from . import vision
BaseOptions = core.base_options.BaseOptions BaseOptions = core.base_options.BaseOptions

View File

@ -11,3 +11,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
"""MediaPipe Tasks Audio API."""
import mediapipe.tasks.python.audio.core
import mediapipe.tasks.python.audio.audio_classifier
AudioClassifier = audio_classifier.AudioClassifier
AudioClassifierOptions = audio_classifier.AudioClassifierOptions
RunningMode = core.audio_task_running_mode.AudioTaskRunningMode
# Remove unnecessary modules to avoid duplication in API docs.
del audio_classifier
del core
del mediapipe

View File

@ -11,3 +11,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
"""MediaPipe Tasks Text API."""
import mediapipe.tasks.python.text.text_classifier
TextClassifier = text_classifier.TextClassifier
TextClassifierOptions = text_classifier.TextClassifierOptions
# Remove unnecessary modules to avoid duplication in API docs.
del mediapipe
del text_classifier