Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def get_available_free(use_cache = False):
|
|
30 |
vision_available = True
|
31 |
pro_sub = False
|
32 |
try:
|
33 |
-
InferenceClient(m, timeout=
|
34 |
text_available = True
|
35 |
except Exception as e:
|
36 |
print(e)
|
@@ -43,7 +43,7 @@ def get_available_free(use_cache = False):
|
|
43 |
return pd.read_csv("./data.csv").to_dict(orient='list')
|
44 |
return []
|
45 |
try:
|
46 |
-
InferenceClient(m, timeout=
|
47 |
chat_available = True
|
48 |
except Exception as e:
|
49 |
print(e)
|
|
|
30 |
vision_available = True
|
31 |
pro_sub = False
|
32 |
try:
|
33 |
+
InferenceClient(m, timeout=10, token=HUGGINGFACE_TOKEN).text_generation("Hi.", max_new_tokens=1)
|
34 |
text_available = True
|
35 |
except Exception as e:
|
36 |
print(e)
|
|
|
43 |
return pd.read_csv("./data.csv").to_dict(orient='list')
|
44 |
return []
|
45 |
try:
|
46 |
+
InferenceClient(m, timeout=10).chat_completion(messages=[{'role': 'user', 'content': 'Hi.'}], max_tokens=1)
|
47 |
chat_available = True
|
48 |
except Exception as e:
|
49 |
print(e)
|