Update app.py
Browse files
app.py
CHANGED
@@ -4,13 +4,18 @@ import gradio as gr
|
|
4 |
import streamlit as st
|
5 |
from transformers import pipeline
|
6 |
from datasets import load_dataset
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Initialize text-generation pipeline with the model
|
9 |
model_name = "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF"
|
10 |
pipe = pipeline("text-generation", model=model_name)
|
11 |
|
12 |
# Load the dataset from the cloned local directory
|
13 |
-
ds = load_dataset("./canadian-legal-data", split="train",verify=False)
|
14 |
|
15 |
# Gradio Interface setup
|
16 |
def respond(
|
|
|
4 |
import streamlit as st
|
5 |
from transformers import pipeline
|
6 |
from datasets import load_dataset
|
7 |
+
from huggingface_hub import hf_hub_download
|
8 |
+
from datasets import load_dataset
|
9 |
+
|
10 |
+
file_path = hf_hub_download("BEE-spoke-data/survivorslib-law-books", filename="train.parquet")
|
11 |
+
ds = load_dataset("parquet", data_files=file_path)
|
12 |
|
13 |
# Initialize text-generation pipeline with the model
|
14 |
model_name = "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF"
|
15 |
pipe = pipeline("text-generation", model=model_name)
|
16 |
|
17 |
# Load the dataset from the cloned local directory
|
18 |
+
# ds = load_dataset("./canadian-legal-data", split="train",verify=False)
|
19 |
|
20 |
# Gradio Interface setup
|
21 |
def respond(
|