GithubHelp home page GithubHelp logo

Comments (11)

makseq avatar makseq commented on September 26, 2024 5

If you place your file to label-studio/backend/static/data/1.wav then it will be available as http://localhost:8200/static/data/1.wav. Or you can make symlink to your data folder:

ln -s /my/data label-studio/backend/static/data

from label-studio.

niklub avatar niklub commented on September 26, 2024 4

Hi YongWookHa,

Label Studio doesn't support local file paths, but URLs. If you can't host somewhere your images or audio files for some reason, I suggest the following aforementioned workaround:

  1. Copy your files or make a symlink to static dir:
 ln -s my/dir/with/images label-studio/static/my_images
  1. Create your file.json with:
[
{"image": "http://localhost:8200/static/my_images/000.png"},
{"image": "http://localhost:8200/static/my_images/001.png"},
{"image": "http://localhost:8200/static/my_images/002.png"}
]
  1. Upload file.json via UI or start label-studio start my-project -i file.json --init

from label-studio.

YongWookHa avatar YongWookHa commented on September 26, 2024 1

Hi.
I have similar problem.
I ran the server locally with this command.

label-studio start my-project -i sample-2020-01-22-09-10.json --init

and, in the json, I wrote like

[{"image": "000.png"}, 
{"image": "001.png"}, 
{"image": "002.png"}]

image
And I found this.

Where should i put the image?
I have put the image in cwd of label-studio start my-project ..., but it doesn't work.

According to the server log, I can assume that the error is about 'not found'(404).

Please help me to solve!
Thanks in advance.

from label-studio.

makseq avatar makseq commented on September 26, 2024

Can you move you audio files over your hard disk? If you can place them nearby server.py, we will implement the fast solution.

from label-studio.

checker20 avatar checker20 commented on September 26, 2024

Can you move you audio files over your hard disk? If you can place them nearby server.py, we will implement the fast solution.

Yes I can! What is the fast solution?

from label-studio.

shevchenkonik avatar shevchenkonik commented on September 26, 2024

@checker20 Did you manage to solve this issue? @makseq suggested a quick solution for you.

But need to do the correct support of local data and if you can make such functionality, then we will approve PR for community. 👍

from label-studio.

maxpv avatar maxpv commented on September 26, 2024

I tried the suggested solution above with no success.

#config.xml
<View>
  <Header value="Choose text sentiment:"/>
  <Text name="my_text" value="$url"/>
  <Choices name="sentiment" toName="my_text" choice="single" showInLine="true">
    <Choice value="Positive"/>
    <Choice value="Negative"/>
    <Choice value="Neutral"/>
  </Choices>
</View>
#task.json
[{
    "url": "http://127.0.0.1:8200/static/file1.txt"
},
{
    "url": "http://127.0.0.1:8200/static/file2.txt"
}
]

This yield the following result:
Screenshot 2019-10-24 at 16 54 59

The file is correctly placed in backend/static/file*.txt. I also tried text key instead of url.

from label-studio.

shevchenkonik avatar shevchenkonik commented on September 26, 2024

@maxpv
Currently, LS doesn't support .txt files, text format only:

[{
  "text": "Lorem.."
}]

from label-studio.

maxpv avatar maxpv commented on September 26, 2024

Ok thanks for your answer, I came from #101

from label-studio.

Khanifsaleh avatar Khanifsaleh commented on September 26, 2024

Hi YongWookHa,

Label Studio doesn't support local file paths, but URLs. If you can't host somewhere your images or audio files for some reason, I suggest the following aforementioned workaround:

1. Copy your files or make a symlink to static dir:
 ln -s my/dir/with/images label-studio/static/my_images
1. Create your file.json with:
[
{"image": "http://localhost:8200/static/my_images/000.png"},
{"image": "http://localhost:8200/static/my_images/001.png"},
{"image": "http://localhost:8200/static/my_images/002.png"}
]
1. Upload file.json via UI or start `label-studio start my-project -i file.json --init`

Hai, I installed label studio using pip, where is label-studio/static/ location? I've copy my-file-folder to anaconda3/envs/my_env/lib/python3.6/site-packages/label_studio/core/static/ and create file.json like you mentioned. But it still failed.

from label-studio.

makseq avatar makseq commented on September 26, 2024

This ticker is very outdated. Please, check this docs: https://labelstud.io/guide/tasks.html#Import-data-from-the-Label-Studio-UI

from label-studio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.