Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse files- test_api.py +20 -0
- tinytroupe/config.ini +1 -1
test_api.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
from gradio_client import Client
|
| 3 |
+
import json
|
| 4 |
+
|
| 5 |
+
print("Connecting to harvesthealth/tiny_factory...")
|
| 6 |
+
client = Client("harvesthealth/tiny_factory")
|
| 7 |
+
|
| 8 |
+
print("Calling /generate_personas...")
|
| 9 |
+
try:
|
| 10 |
+
result = client.predict(
|
| 11 |
+
business_description="A revolutionary health tech startup focusing on personalized nutrition.",
|
| 12 |
+
customer_profile="Health-conscious professionals aged 25-45 living in urban areas.",
|
| 13 |
+
num_personas=1,
|
| 14 |
+
blablador_api_key=None,
|
| 15 |
+
api_name="/generate_personas"
|
| 16 |
+
)
|
| 17 |
+
print("API call successful!")
|
| 18 |
+
print(json.dumps(result, indent=2))
|
| 19 |
+
except Exception as e:
|
| 20 |
+
print(f"API call failed: {e}")
|
tinytroupe/config.ini
CHANGED
|
@@ -90,7 +90,7 @@ QUALITY_THRESHOLD = 5
|
|
| 90 |
|
| 91 |
|
| 92 |
[Logging]
|
| 93 |
-
LOGLEVEL=
|
| 94 |
# ERROR
|
| 95 |
# WARNING
|
| 96 |
# INFO
|
|
|
|
| 90 |
|
| 91 |
|
| 92 |
[Logging]
|
| 93 |
+
LOGLEVEL=INFO
|
| 94 |
# ERROR
|
| 95 |
# WARNING
|
| 96 |
# INFO
|