Spaces:
Running
Running
Julien Launay
commited on
Commit
•
0a0bf23
1
Parent(s):
0b15f14
:closed_lock_with_key: Update authentication to inference server
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ STOP_STR = f"\n{USER_NAME}:"
|
|
14 |
STOP_SUSPECT_LIST = [":", "\n", "User"]
|
15 |
|
16 |
INFERENCE_ENDPOINT = os.environ.get("INFERENCE_ENDPOINT")
|
|
|
17 |
|
18 |
|
19 |
def chat_accordion():
|
@@ -214,7 +215,7 @@ if __name__ == "__main__":
|
|
214 |
default=INFERENCE_ENDPOINT,
|
215 |
)
|
216 |
args = parser.parse_args()
|
217 |
-
client = Client(args.addr)
|
218 |
demo = get_demo(client)
|
219 |
demo.queue(concurrency_count=2)
|
220 |
demo.launch()
|
|
|
14 |
STOP_SUSPECT_LIST = [":", "\n", "User"]
|
15 |
|
16 |
INFERENCE_ENDPOINT = os.environ.get("INFERENCE_ENDPOINT")
|
17 |
+
INFERENCE_AUTH = os.environ.get("INFERENCE_AUTH")
|
18 |
|
19 |
|
20 |
def chat_accordion():
|
|
|
215 |
default=INFERENCE_ENDPOINT,
|
216 |
)
|
217 |
args = parser.parse_args()
|
218 |
+
client = Client(args.addr, headers={"Authorization": f"Basic {INFERENCE_AUTH}"})
|
219 |
demo = get_demo(client)
|
220 |
demo.queue(concurrency_count=2)
|
221 |
demo.launch()
|