Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ else:
|
|
12 |
print("Hugging Face token successfully retrieved.")
|
13 |
|
14 |
# Initialize the Client for the Hugging Face Space with the token
|
15 |
-
client = Client("segestic/token-cost-calculator"
|
16 |
|
17 |
# Function to interact with the Hugging Face Space API
|
18 |
def interact_with_space(system_prompt, user_prompt, assistant_response, model="gpt-4o"):
|
@@ -22,7 +22,8 @@ def interact_with_space(system_prompt, user_prompt, assistant_response, model="g
|
|
22 |
user_prompt=user_prompt,
|
23 |
assistant_response=assistant_response,
|
24 |
model=model,
|
25 |
-
api_name="/predict"
|
|
|
26 |
)
|
27 |
return result
|
28 |
|
|
|
12 |
print("Hugging Face token successfully retrieved.")
|
13 |
|
14 |
# Initialize the Client for the Hugging Face Space with the token
|
15 |
+
client = Client("segestic/token-cost-calculator")
|
16 |
|
17 |
# Function to interact with the Hugging Face Space API
|
18 |
def interact_with_space(system_prompt, user_prompt, assistant_response, model="gpt-4o"):
|
|
|
22 |
user_prompt=user_prompt,
|
23 |
assistant_response=assistant_response,
|
24 |
model=model,
|
25 |
+
api_name="/predict",
|
26 |
+
token=hf_token
|
27 |
)
|
28 |
return result
|
29 |
|