File size: 853 Bytes
d84bb55
cbd44c9
eec5410
00f162e
a6e0ce3
00f162e
eec5410
00f162e
d84bb55
00f162e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a6e0ce3
00f162e
a6e0ce3
00f162e
 
 
 
 
eec5410
 
a6e0ce3
 
eec5410
 
a6e0ce3
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
import os
import spaces
import gradio as gr
from huggingface_hub import login as hf_login
from pydantic import BaseModel
from vllm import LLM

hf_login(token=os.getenv("HF_TOKEN"))

class PatientRecord(BaseModel):
  life_style: str
  family_history: str
  social_history: str
  medical_surgical_history: str
  signs_symptoms: str
  comorbidities: str
  diagnostic_techniques_procedures: str
  diagnosis: str
  laboratory_values: str
  pathology: str
  pharmacological_therapy: str
  interventional_therapy: str
  patient_outcome_assessment: str
  age: str
  gender: str

model_name = "meta-llama/Llama-3.2-1B-Instruct"

model = LLM(
    model=model_name,
    dtype=torch.bfloat16,
    trust_remote_code=True,
    enforce_eager=True,
)

with gr.Blocks() as demo:
    gr.Markdown("# 🎓 Paper Analysis Tool")

if __name__ == "__main__":
    demo.launch()