Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,11 +6,6 @@ Automatically generated by Colab.
|
|
| 6 |
Original file is located at
|
| 7 |
https://colab.research.google.com/drive/1ICE_-Hl23GdbEO6Tt5VjvJ8XMyYC3Z3b
|
| 8 |
"""
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
import torch
|
| 15 |
import fitz # PyMuPDF for PDF text extraction
|
| 16 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
|
@@ -21,9 +16,14 @@ import os
|
|
| 21 |
from huggingface_hub import login
|
| 22 |
|
| 23 |
# Authenticate with Hugging Face Hub
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
# Load the Mistral 7B model and tokenizer
|
| 29 |
model_name = 'mistralai/Mistral-7B-Instruct-v0.3'
|
|
|
|
| 6 |
Original file is located at
|
| 7 |
https://colab.research.google.com/drive/1ICE_-Hl23GdbEO6Tt5VjvJ8XMyYC3Z3b
|
| 8 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
import torch
|
| 10 |
import fitz # PyMuPDF for PDF text extraction
|
| 11 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
|
|
|
| 16 |
from huggingface_hub import login
|
| 17 |
|
| 18 |
# Authenticate with Hugging Face Hub
|
| 19 |
+
|
| 20 |
+
pdf_path1 ='https://huggingface.co/spaces/EdgarDataScientist/Diabetrek_AI/blob/main/Chrono%201.pdf'
|
| 21 |
+
pdf_path2 ='https://huggingface.co/spaces/EdgarDataScientist/Diabetrek_AI/blob/main/Chrono%202.pdf'
|
| 22 |
+
pdf_path3 ='https://huggingface.co/spaces/EdgarDataScientist/Diabetrek_AI/blob/main/Chrono%203.pdf'
|
| 23 |
+
pdf_path4 = 'https://huggingface.co/spaces/EdgarDataScientist/Diabetrek_AI/blob/main/Chrono%204.pdf'
|
| 24 |
+
pdf_path5 = 'https://huggingface.co/spaces/EdgarDataScientist/Diabetrek_AI/blob/main/Chrono%205.pdf'
|
| 25 |
+
pdf_path6 = 'https://huggingface.co/spaces/EdgarDataScientist/Diabetrek_AI/blob/main/Chrono%206.pdf'
|
| 26 |
+
pdf_path7 = 'https://huggingface.co/spaces/EdgarDataScientist/Diabetrek_AI/blob/main/Chrono%207.pdf'
|
| 27 |
|
| 28 |
# Load the Mistral 7B model and tokenizer
|
| 29 |
model_name = 'mistralai/Mistral-7B-Instruct-v0.3'
|