pablorocg commited on
Commit
303e225
1 Parent(s): 4126b46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -1,4 +1,20 @@
1
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  # OBTENER EL DATASET________________________________________________________________________________
3
  def get_medical_flashcards_dataset():
4
  """
 
1
+ import os
2
+ from faiss import write_index
3
+ import gradio as gr
4
+ import numpy as np
5
+ import torch
6
+ from tqdm import tqdm
7
+ from torch.utils.data import DataLoader, Dataset
8
+ from datasets import load_dataset
9
+ import pandas as pd
10
+ import faiss
11
+ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig, AutoModel
12
+ from transformers import TextIteratorStreamer
13
+ from threading import Thread
14
+
15
+ torch.set_num_threads(2)
16
+ HF_TOKEN = os.environ.get("SECRET_TOKEN")
17
+
18
  # OBTENER EL DATASET________________________________________________________________________________
19
  def get_medical_flashcards_dataset():
20
  """