Spaces:
Runtime error
Runtime error
fanyang
commited on
Commit
·
ff1bdd6
1
Parent(s):
db583af
Added logger.
Browse files- app.py +4 -1
- requirements.txt +1 -0
app.py
CHANGED
@@ -2,6 +2,7 @@ import json
|
|
2 |
import os
|
3 |
import requests
|
4 |
import gradio as gr
|
|
|
5 |
|
6 |
# Environment variables for backend URL and model name
|
7 |
BACKEND_URL = os.getenv('BACKEND_URL','')
|
@@ -59,6 +60,8 @@ def generate_chat(input_text: str, history=None):
|
|
59 |
history.append((input_text, response))
|
60 |
return None, gen
|
61 |
|
|
|
|
|
62 |
# Gradio interface
|
63 |
block = gr.Blocks()
|
64 |
|
@@ -89,4 +92,4 @@ with block as demo:
|
|
89 |
queue=False
|
90 |
)
|
91 |
|
92 |
-
demo.queue(api_open=False).launch(height=800, share=
|
|
|
2 |
import os
|
3 |
import requests
|
4 |
import gradio as gr
|
5 |
+
from loguru import logger
|
6 |
|
7 |
# Environment variables for backend URL and model name
|
8 |
BACKEND_URL = os.getenv('BACKEND_URL','')
|
|
|
60 |
history.append((input_text, response))
|
61 |
return None, gen
|
62 |
|
63 |
+
logger.info('Starting the OrionStart-Yi-34B Chat...')
|
64 |
+
|
65 |
# Gradio interface
|
66 |
block = gr.Blocks()
|
67 |
|
|
|
92 |
queue=False
|
93 |
)
|
94 |
|
95 |
+
demo.queue(api_open=False).launch(height=800, share=True,show_api=False)
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
loguru
|