Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
|
| 17 |
# Function to build structured input and query the LLM
|
| 18 |
def analyze(
|
| 19 |
albumin, creatinine, glucose, crp, mcv, rdw, alp,
|
| 20 |
-
wbc, lymph, age, gender, height, weight
|
| 21 |
):
|
| 22 |
# System-style instruction
|
| 23 |
system_prompt = (
|
|
@@ -34,7 +34,6 @@ def analyze(
|
|
| 34 |
- Gender: {gender}
|
| 35 |
- Height: {height} cm
|
| 36 |
- Weight: {weight} kg
|
| 37 |
-
- BMI: {bmi}
|
| 38 |
|
| 39 |
Lab Values:
|
| 40 |
- Albumin: {albumin} g/dL
|
|
@@ -93,7 +92,7 @@ with gr.Blocks() as demo:
|
|
| 93 |
analyze_btn.click(
|
| 94 |
fn=analyze,
|
| 95 |
inputs=[albumin, creatinine, glucose, crp, mcv, rdw, alp,
|
| 96 |
-
wbc, lymph, age, gender, height, weight
|
| 97 |
outputs=output
|
| 98 |
)
|
| 99 |
|
|
|
|
| 17 |
# Function to build structured input and query the LLM
|
| 18 |
def analyze(
|
| 19 |
albumin, creatinine, glucose, crp, mcv, rdw, alp,
|
| 20 |
+
wbc, lymph, age, gender, height, weight
|
| 21 |
):
|
| 22 |
# System-style instruction
|
| 23 |
system_prompt = (
|
|
|
|
| 34 |
- Gender: {gender}
|
| 35 |
- Height: {height} cm
|
| 36 |
- Weight: {weight} kg
|
|
|
|
| 37 |
|
| 38 |
Lab Values:
|
| 39 |
- Albumin: {albumin} g/dL
|
|
|
|
| 92 |
analyze_btn.click(
|
| 93 |
fn=analyze,
|
| 94 |
inputs=[albumin, creatinine, glucose, crp, mcv, rdw, alp,
|
| 95 |
+
wbc, lymph, age, gender, height, weight],
|
| 96 |
outputs=output
|
| 97 |
)
|
| 98 |
|