Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ async_client = AsyncOpenAI(
|
|
38 |
async def async_ping() -> None:
|
39 |
try:
|
40 |
response = await async_client.completions.create(
|
41 |
-
model=model_name, prompt="
|
42 |
)
|
43 |
print(response)
|
44 |
except Exception as e:
|
@@ -151,9 +151,6 @@ def process_video(video_path: str) -> list[dict]:
|
|
151 |
import base64
|
152 |
import re
|
153 |
import mimetypes # Added for MIME type detection
|
154 |
-
import base64
|
155 |
-
import re
|
156 |
-
import os
|
157 |
import requests
|
158 |
from typing import List, Dict, Union, Any
|
159 |
|
@@ -300,6 +297,7 @@ def run(message: dict, history: list[dict]) -> Iterator[str]:
|
|
300 |
model=model_name, # Use appropriate model
|
301 |
messages=messages,
|
302 |
stream=True,
|
|
|
303 |
)
|
304 |
|
305 |
# Stream the response
|
|
|
38 |
async def async_ping() -> None:
|
39 |
try:
|
40 |
response = await async_client.completions.create(
|
41 |
+
model=model_name, prompt="Repeat Hello", max_tokens=1,
|
42 |
)
|
43 |
print(response)
|
44 |
except Exception as e:
|
|
|
151 |
import base64
|
152 |
import re
|
153 |
import mimetypes # Added for MIME type detection
|
|
|
|
|
|
|
154 |
import requests
|
155 |
from typing import List, Dict, Union, Any
|
156 |
|
|
|
297 |
model=model_name, # Use appropriate model
|
298 |
messages=messages,
|
299 |
stream=True,
|
300 |
+
max_tokens=4096,
|
301 |
)
|
302 |
|
303 |
# Stream the response
|