Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,6 +31,11 @@ from huggingface_hub import InferenceClient
|
|
| 31 |
# response += token
|
| 32 |
# yield response
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
corpus_ids = str(os.environ['corpus_ids']).split(',')
|
| 35 |
cfg = OmegaConf.create({
|
| 36 |
'customer_id': str(os.environ['customer_id']),
|
|
|
|
| 31 |
# response += token
|
| 32 |
# yield response
|
| 33 |
|
| 34 |
+
def isTrue(x) -> bool:
|
| 35 |
+
if isinstance(x, bool):
|
| 36 |
+
return x
|
| 37 |
+
return x.strip().lower() == 'true'
|
| 38 |
+
|
| 39 |
corpus_ids = str(os.environ['corpus_ids']).split(',')
|
| 40 |
cfg = OmegaConf.create({
|
| 41 |
'customer_id': str(os.environ['customer_id']),
|