Spaces:
Runtime error
Runtime error
File size: 483 Bytes
f4fac26 c3669dd f4fac26 c3669dd f4fac26 90ec97f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import gradio as gr
import platform
import os
import time
from threading import Thread
from rich.text import Text
from rich.live import Live
from model.infer import ChatBot
from config import InferConfig
infer_config = InferConfig()
chat_bot = ChatBot(infer_config=infer_config)
def greet(name):
streamer = chat_bot.chat(name)
return streamer
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch(server_name='0.0.0.0', server_port=23678)
|