tensorflow / tensorflow/text

How to use my own data?

Open
#1,004 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.3k
Forks
379
Avg merge
3h 30m
Merged PRs (30d)
8

Description

I copied the code and got this working on my computer, but when I try to change the path to file, and give it something other than the example text, it crashes.

Default (This one always works)
path_to_file = tf.keras.utils.get_file('shakespeare.txt', 'https://storage.googleapis.com/download.tensorflow.org/data/shakespeare.txt')

What I want:
path_to_file = tf.keras.utils.get_file('mytexttxt', 'file:///C:/Users/my_path/mytext.txt')

I am confused, what am I missing?
rnn.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the usage shown in the issue and inspect rnn.zip to identify the example entry point and how it loads text through tf.keras.utils.get_file. Reproduce the reported crash with the custom path, then determine whether the project needs clearer guidance or a code change; done means the custom text input works or the supported input requirements are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.