Spaces:
Runtime error
Runtime error
conv url to env var
Browse files
app.py
CHANGED
|
@@ -4,13 +4,14 @@ from gradio_client import Client
|
|
| 4 |
import time
|
| 5 |
|
| 6 |
hf_key = os.environ['HF_API_KEY']
|
|
|
|
| 7 |
|
| 8 |
messages = [
|
| 9 |
{"role": "system", "content": "You are a helpful assistant."},
|
| 10 |
]
|
| 11 |
msg_count = 0
|
| 12 |
|
| 13 |
-
client = Client(
|
| 14 |
def get_llm_rsp(text):
|
| 15 |
rsp = client.predict(
|
| 16 |
text, # str in 'Input your question:' Textbox component
|
|
|
|
| 4 |
import time
|
| 5 |
|
| 6 |
hf_key = os.environ['HF_API_KEY']
|
| 7 |
+
client_url = os.environ['BK_URL']
|
| 8 |
|
| 9 |
messages = [
|
| 10 |
{"role": "system", "content": "You are a helpful assistant."},
|
| 11 |
]
|
| 12 |
msg_count = 0
|
| 13 |
|
| 14 |
+
client = Client(BL_URL, hf_token=hf_key)
|
| 15 |
def get_llm_rsp(text):
|
| 16 |
rsp = client.predict(
|
| 17 |
text, # str in 'Input your question:' Textbox component
|