mirror of
https://github.com/gpt-omni/mini-omni
synced 2024-11-16 05:03:47 +00:00
fix utils import
This commit is contained in:
parent
86a7666a01
commit
26c31d5b33
10
server.py
10
server.py
@ -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 flask
|
||||||
import base64
|
import base64
|
||||||
import tempfile
|
import tempfile
|
||||||
import traceback
|
import traceback
|
||||||
from flask import Flask, Response, stream_with_context
|
from flask import Flask, Response, stream_with_context
|
||||||
from inference import OmniInference
|
|
||||||
|
|
||||||
|
|
||||||
class OmniChatServer(object):
|
class OmniChatServer(object):
|
||||||
@ -54,4 +60,4 @@ def serve(ip='0.0.0.0', port=60808, device='cuda:0'):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import fire
|
import fire
|
||||||
fire.Fire(serve)
|
fire.Fire(serve)
|
||||||
|
|
||||||
|
0
utils/__init__.py
Normal file
0
utils/__init__.py
Normal 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 streamlit as st
|
||||||
import wave
|
import wave
|
||||||
|
|
||||||
@ -13,7 +20,6 @@ import tempfile
|
|||||||
import librosa
|
import librosa
|
||||||
import traceback
|
import traceback
|
||||||
from pydub import AudioSegment
|
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")
|
API_URL = os.getenv("API_URL", "http://127.0.0.1:60808/chat")
|
||||||
|
Loading…
Reference in New Issue
Block a user