Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -68,13 +68,13 @@ def load_movie_data():
|
|
68 |
# Option 1: Try loading with trust_remote_code
|
69 |
try:
|
70 |
dataset = load_dataset(
|
71 |
-
"
|
72 |
split="train[:2000]",
|
73 |
trust_remote_code=True # Explicitly allow trusted code
|
74 |
)
|
75 |
df = pd.DataFrame(dataset)
|
76 |
-
|
77 |
-
"
|
78 |
return df
|
79 |
|
80 |
except Exception as e:
|
|
|
68 |
# Option 1: Try loading with trust_remote_code
|
69 |
try:
|
70 |
dataset = load_dataset(
|
71 |
+
"facebook/wiki_movies",
|
72 |
split="train[:2000]",
|
73 |
trust_remote_code=True # Explicitly allow trusted code
|
74 |
)
|
75 |
df = pd.DataFrame(dataset)
|
76 |
+
df['context'] = "Question: " + df['question'].str.strip() + "\n" + \
|
77 |
+
"Answer: " + df['answer'].str.strip()
|
78 |
return df
|
79 |
|
80 |
except Exception as e:
|