cathw commited on
Commit
508230e
1 Parent(s): bb16320

Upload reddit_climate_comment.py

Browse files
Files changed (1) hide show
  1. reddit_climate_comment.py +1 -3
reddit_climate_comment.py CHANGED
@@ -5,7 +5,6 @@ from datasets import GeneratorBasedBuilder, Features, Value, Sequence, SplitGene
5
  import logging
6
  import pandas as pd
7
  from typing import Dict
8
- from datasets import Image
9
 
10
  CITATION = ""
11
  _DESCRIPTION = "Demo"
@@ -25,7 +24,7 @@ class NewDataset(GeneratorBasedBuilder):
25
  "post_author": Value("string"),
26
  "post_body": Value("string"),
27
  "post_url": Value("string"),
28
- "post_pic": Image(),
29
  "subreddit": Value("string"),
30
  "post_timestamp": Value("string"),
31
  "post_upvotes": Value("int32"),
@@ -69,7 +68,6 @@ class NewDataset(GeneratorBasedBuilder):
69
  post_body = post_data['PostBody']
70
  post_url = post_data['PostUrl']
71
  post_pic = post_data['PostPic']
72
- post_pic = Image.from_path(post_pic)
73
  subreddit = post_data['Subreddit']
74
  post_timestamp = post_data['PostTimestamp']
75
  post_upvotes = post_data['PostUpvotes']
 
5
  import logging
6
  import pandas as pd
7
  from typing import Dict
 
8
 
9
  CITATION = ""
10
  _DESCRIPTION = "Demo"
 
24
  "post_author": Value("string"),
25
  "post_body": Value("string"),
26
  "post_url": Value("string"),
27
+ "post_pic": Value("string"),
28
  "subreddit": Value("string"),
29
  "post_timestamp": Value("string"),
30
  "post_upvotes": Value("int32"),
 
68
  post_body = post_data['PostBody']
69
  post_url = post_data['PostUrl']
70
  post_pic = post_data['PostPic']
 
71
  subreddit = post_data['Subreddit']
72
  post_timestamp = post_data['PostTimestamp']
73
  post_upvotes = post_data['PostUpvotes']