Spaces:
Runtime error
Runtime error
from fastapi import FastAPI | |
import gradio as gr | |
import uvicorn | |
import socket | |
from interaction import MindBot | |
CUSTOM_PATH = "/mindbot/541832" | |
import os | |
print('^_^:',os.getenv("Zimix"),'!!!!!!!!!!') | |
# @app.get("/") | |
# def read_main(): | |
# return {"message": "This is your main app"} | |
# model_name = 'IDEA-CCNL/Ziya-LLaMA-13B-v1' | |
mind_bot = MindBot( | |
"Zimix/ziya_v1.1", | |
"Zimix/ziya_v1.1", | |
if_int8=True | |
) | |
# @app.get("/api/mindbot/541832") | |
# async def chat(query, clear_history=False): | |
# output = mind_bot.common_generate(query, clear_history) | |
# return output | |
# host = socket.gethostbyname(socket.gethostname()) | |
# print(f'demo run on {host}') | |
demo = mind_bot.new_chat_bot() | |
demo.launch() | |
# app = gr.mount_gradio_app(app, demo, path=CUSTOM_PATH) | |
# uvicorn.run(app, host='192.168.81.9', port=7880) | |