eternalBlissard
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,7 @@ ACCESS_TOKEN = os.getenv("HF_TOKEN")
|
|
18 |
client = OpenAI(
|
19 |
base_url="https://api-inference.huggingface.co/v1/",
|
20 |
api_key=ACCESS_TOKEN,
|
|
|
21 |
)
|
22 |
|
23 |
# val = None
|
@@ -86,7 +87,7 @@ def respond(
|
|
86 |
messages.append({"role": "user", "content": message})
|
87 |
|
88 |
response = ""
|
89 |
-
|
90 |
for message in client.chat.completions.create(
|
91 |
model="Qwen/Qwen2.5-72B-Instruct",
|
92 |
max_tokens=max_tokens,
|
|
|
18 |
client = OpenAI(
|
19 |
base_url="https://api-inference.huggingface.co/v1/",
|
20 |
api_key=ACCESS_TOKEN,
|
21 |
+
timeout=httpx.Timeout(60.0, connect=10.0, read=50.0)
|
22 |
)
|
23 |
|
24 |
# val = None
|
|
|
87 |
messages.append({"role": "user", "content": message})
|
88 |
|
89 |
response = ""
|
90 |
+
print("TIme for response")
|
91 |
for message in client.chat.completions.create(
|
92 |
model="Qwen/Qwen2.5-72B-Instruct",
|
93 |
max_tokens=max_tokens,
|