Click here to Skip to main content
15,881,838 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
So I want to host this Project on an Apache web page on my Linux Server. I want to access it outside of the linux Server via Apache.

What I have tried:

I put in the html code as shown in the tutorial, it shows on the web page but after pressing the Detect Scene button nothing happens. No response.

<pre><html>
<body>
Detect the scene in this file: <input id="image" type="file" />
<input type="button" value="Detect Scene" onclick="detectScene(image)" />

<script>
function detectScene(fileChooser) {
    var formData = new FormData();
    formData.append('image', fileChooser.files[0]);

    fetch('http://localhost:5000/v1/vision/detect/scene', {
        method: "POST",
        body: formData
    })
    .then(response => {
        if (response.ok) response.json().then(data => {
            console.log(`Scene is ${data.label}, ${data.confidence} confidence`)
        });
    });
}
</script>
</body>
</html>



After looking into the [http://localhost:5000/v1/vision/detect/scene'] page,
I saw that there is also a blank page, this could be the problem, but i have no Idea on how to fix it.

Any help is greatly appreciated!
Posted
Comments
Richard MacCutchan 6-Oct-22 6:16am    
Where is the code that does the detection part?
Member 15789007 12-Oct-22 3:27am    
Well in the Overview it already works, but i cannot access the results outside of this interface.
On the interface after installing it, it works fine, I dont know why it won`t work outside of the standard interface

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900