update gradio chat
This commit is contained in:
parent
4e3985e156
commit
ca7044bc90
|
@ -19,6 +19,7 @@ API_BASE = API_BASE.strip('/')
|
|||
|
||||
APP_TITLE = os.getenv('APP_TITLE')
|
||||
PRIMARY_MODEL_CHOICE = os.getenv('PRIMARY_MODEL_CHOICE')
|
||||
TRACKING_CODE = os.getenv('TRACKING_CODE')
|
||||
|
||||
|
||||
def background():
|
||||
|
@ -92,4 +93,11 @@ examples = ["hello"]
|
|||
if CONTEXT_TRIGGER_PHRASE:
|
||||
examples.insert(0, CONTEXT_TRIGGER_PHRASE)
|
||||
|
||||
gr.ChatInterface(stream_response, examples=examples, title=APP_TITLE, analytics_enabled=False, cache_examples=False, css='#component-0{height:100%!important}').queue(concurrency_count=1, api_open=False).launch(show_api=False)
|
||||
with gr.Blocks(analytics_enabled=False) as demo:
|
||||
gr.ChatInterface(stream_response, examples=examples, title=APP_TITLE, analytics_enabled=False, cache_examples=False, css='#component-0{height:100%!important}')
|
||||
|
||||
if TRACKING_CODE:
|
||||
print('Inserting tracking code')
|
||||
gr.HTML(TRACKING_CODE)
|
||||
|
||||
demo.queue(concurrency_count=1, api_open=False).launch(show_api=False)
|
||||
|
|
Reference in New Issue