Spaces:
Build error
Build error
File size: 1,513 Bytes
dce95b8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'object_positions': {'Regular Modular FnS': {'top': '107.55 cm', 'bottom': '0.0 cm', 'left': '103.1 cm', 'right': '33.44 cm'}, 'Focused Medium Core': {'top': '101.69 cm', 'bottom': '0.0 cm', 'left': '47.57 cm', 'right': '85.74 cm'}, 'Modular Small FnS': {'top': '83.9 cm', 'bottom': '34.75 cm', 'left': '49.15 cm', 'right': '86.44 cm'}}, 'actual_distances': [{'object': ['Regular Modular FnS', 'Focused Medium Core'], 'distances': '8.73 cm'}, {'object': ['Regular Modular FnS', 'Modular Small FnS'], 'distances': '12.97 cm'}, {'object': ['Focused Medium Core', 'Modular Small FnS'], 'distances': '1.42 cm'}]}\n"
]
}
],
"source": [
"import requests\n",
"url = \"https://WalidAlHassan-Distance.hf.space/process_image\"\n",
"data = {\"image_url\": \"https://i.postimg.cc/BQ0gHXjQ/1.jpg\"}\n",
"response = requests.post(url, json=data)\n",
"print(response.json())"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "icr",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|