-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
65 lines (61 loc) · 2.33 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import os
from langchain.llms import OpenAI
from langchain.agents import create_csv_agent
os.environ["OPENAI_API_KEY"] = "YOUR_API_KEY"
agent = create_csv_agent(OpenAI(temperature=0),
'sample_data.csv',
verbose=True)
spacer = "-------------------------"
print(" ")
print("-----------------------------------")
print("LangChain Health Assistant by Mayu")
print("-----------------------------------")
print(" ")
print(spacer)
print("Patient Info:")
print(spacer)
output = agent.run("Act as a friendly and informative medical professional and answer the following question: What is the first name, last name, height, and weight of patient 4d53df?")
print(output)
print(" ")
print(spacer)
print("Sp02 Analysis: ")
print(spacer)
output1 = agent.run("Act as a friendly and informative medical professional and answer the following question: Are the Sp02 levels of patient 4d53df normal? Explain whether the levels are normal or not and what the results indicate.")
print(output1)
print(" ")
print(spacer)
print("Diabetes Analysis: ")
print(spacer)
output2 = agent.run("Act as a friendly and informative medical professional and answer the following question: Does patient 4d53df show any risks associated with Diabetes. Explain your reasoning.")
print(output2)
print(" ")
print(spacer)
print("Heart Disease Analysis: ")
print(spacer)
output3 = agent.run("Based on the data we have, check patient 4d53df for risks associated with Heart Disease. Explain your reasoning.")
print(output3)
print(" ")
print(spacer)
print("Liver Analysis: ")
print(spacer)
output4 = agent.run("Check patient 4d53df for risks associated with Liver Damage. Explain your reasoning.")
print(output4)
print(" ")
print(spacer)
print("C02 Analysis: ")
print(spacer)
output5 = agent.run("Check the Carbon dioxide levels of patient 4d53df. Explain whether the levels are normal or not and what the results indicate.")
print(output5)
print(" ")
print(spacer)
print("Hypokalemia Analysis: ")
print(spacer)
output7 = agent.run("Check patient 4d53df for risks associated with Hypokalemia. Explain your reasoning.")
print(output7)
print(" ")
print(spacer)
print("Platelet Count Analysis: ")
print(spacer)
output8 = agent.run("Check the Platelet Count levels of patient 4d53df. Explain whether the levels are normal or not and what the results indicate.")
print(output8)
print(" ")