Spaces:
Sleeping
Sleeping
Inserted Medication List csv as dataset
Browse files
app.py
CHANGED
|
@@ -5,12 +5,12 @@ from huggingface_hub import InferenceClient
|
|
| 5 |
from datasets import load_dataset
|
| 6 |
from sentence_transformers import SentenceTransformer
|
| 7 |
import torch
|
| 8 |
-
import pandas
|
| 9 |
|
| 10 |
-
file_path =
|
| 11 |
-
dataset = load_dataset("
|
| 12 |
|
| 13 |
-
with open("
|
| 14 |
file_path = file.read()
|
| 15 |
# print(file_path)
|
| 16 |
|
|
@@ -26,8 +26,8 @@ for chunked in chunked_list: #loops through database & adds it to the modificati
|
|
| 26 |
if stripped_list:
|
| 27 |
cleaned_chunks.append(stripped_list) # appends to empty in cleaned_chunks = []
|
| 28 |
#print(cleaned_chunks)
|
| 29 |
-
|
| 30 |
-
|
| 31 |
|
| 32 |
def respond(message, history):
|
| 33 |
if not history:
|
|
|
|
| 5 |
from datasets import load_dataset
|
| 6 |
from sentence_transformers import SentenceTransformer
|
| 7 |
import torch
|
| 8 |
+
import pandas as pd
|
| 9 |
|
| 10 |
+
file_path = "drug list for ai medication chatbot - Sheet1"
|
| 11 |
+
dataset = load_dataset("csv", data_files="drug list for ai medication chatbot - Sheet1.csv")
|
| 12 |
|
| 13 |
+
with open("drug list for ai medication chatbot - Sheet1.csv", "r", encoding = "utf-8") as file:
|
| 14 |
file_path = file.read()
|
| 15 |
# print(file_path)
|
| 16 |
|
|
|
|
| 26 |
if stripped_list:
|
| 27 |
cleaned_chunks.append(stripped_list) # appends to empty in cleaned_chunks = []
|
| 28 |
#print(cleaned_chunks)
|
| 29 |
+
df = pd.read_csv("drug list for ai medication chatbot - Sheet1.csv")
|
| 30 |
+
print(df)
|
| 31 |
|
| 32 |
def respond(message, history):
|
| 33 |
if not history:
|