Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ HEADERS = {"Authorization": f"Bearer {HF_TOKEN}"}
|
|
| 10 |
|
| 11 |
#
|
| 12 |
# 2) Private space endpoint:
|
| 13 |
-
#
|
| 14 |
#
|
| 15 |
PRIVATE_SPACE_ROOT = "https://jtdearmon-rag-dal-budget.hf.space"
|
| 16 |
|
|
@@ -34,6 +34,7 @@ def call_private_space(function_index, data_list):
|
|
| 34 |
|
| 35 |
payload = {"data": data_list}
|
| 36 |
try:
|
|
|
|
| 37 |
resp = requests.post(url, headers=HEADERS, json=payload,verify=False)
|
| 38 |
resp.raise_for_status() # Raises HTTPError on 4xx/5xx
|
| 39 |
json_resp = resp.json()
|
|
@@ -57,7 +58,7 @@ def handle_feedback(user_query, answer, feedback_option):
|
|
| 57 |
|
| 58 |
#
|
| 59 |
# 5) Build the UI layout to mirror your private space,
|
| 60 |
-
# now loading dal_logo.png locally from
|
| 61 |
#
|
| 62 |
with gr.Blocks() as demo:
|
| 63 |
# Top row: logo on the left, title on the right
|
|
|
|
| 10 |
|
| 11 |
#
|
| 12 |
# 2) Private space endpoint:
|
| 13 |
+
# Must match the domain from your private Space's "Embed" or "View App."
|
| 14 |
#
|
| 15 |
PRIVATE_SPACE_ROOT = "https://jtdearmon-rag-dal-budget.hf.space"
|
| 16 |
|
|
|
|
| 34 |
|
| 35 |
payload = {"data": data_list}
|
| 36 |
try:
|
| 37 |
+
# If you really want to skip SSL checks, add `verify=False`:
|
| 38 |
resp = requests.post(url, headers=HEADERS, json=payload,verify=False)
|
| 39 |
resp.raise_for_status() # Raises HTTPError on 4xx/5xx
|
| 40 |
json_resp = resp.json()
|
|
|
|
| 58 |
|
| 59 |
#
|
| 60 |
# 5) Build the UI layout to mirror your private space,
|
| 61 |
+
# now loading dal_logo.png locally from this public repo.
|
| 62 |
#
|
| 63 |
with gr.Blocks() as demo:
|
| 64 |
# Top row: logo on the left, title on the right
|