fix utils import

This commit is contained in:
mini-omni 2024-11-05 18:19:46 +08:00
parent 86a7666a01
commit 26c31d5b33
3 changed files with 15 additions and 3 deletions

View File

@ -1,9 +1,15 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from inference import OmniInference
import flask
import base64
import tempfile
import traceback
from flask import Flask, Response, stream_with_context
from inference import OmniInference
class OmniChatServer(object):

0
utils/__init__.py Normal file
View File

View File

@ -1,3 +1,10 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from utils.vad import get_speech_timestamps, collect_chunks, VadOptions
import streamlit as st
import wave
@ -13,7 +20,6 @@ import tempfile
import librosa
import traceback
from pydub import AudioSegment
from utils.vad import get_speech_timestamps, collect_chunks, VadOptions
API_URL = os.getenv("API_URL", "http://127.0.0.1:60808/chat")