Spaces:
Sleeping
Sleeping
update app.py
#3
by umar-ts - opened
app.py
CHANGED
|
@@ -22,6 +22,8 @@ def process_text(keywords, stage, medical_history):
|
|
| 22 |
return gptService.getShortTermGoals(keywords,medical_history)
|
| 23 |
elif stage == Stage.LONG_TERM_GOALS.value:
|
| 24 |
return gptService.getLongTermGoals(keywords,medical_history)
|
|
|
|
|
|
|
| 25 |
else:
|
| 26 |
print("Unknown stage")
|
| 27 |
raise gr.Error('Unknown stage encountered')
|
|
@@ -45,7 +47,7 @@ medical_history = gr.Textbox(lines=7, label="Medical History", placeholder="Ente
|
|
| 45 |
# stage_choices = [stage.value for stage in Stage]
|
| 46 |
|
| 47 |
# To add few stages
|
| 48 |
-
stage_choices = [Stage.INITIAL_ASSESSMENT.value,Stage.
|
| 49 |
|
| 50 |
stage = gr.Dropdown(choices=stage_choices, label="Stage")
|
| 51 |
|
|
|
|
| 22 |
return gptService.getShortTermGoals(keywords,medical_history)
|
| 23 |
elif stage == Stage.LONG_TERM_GOALS.value:
|
| 24 |
return gptService.getLongTermGoals(keywords,medical_history)
|
| 25 |
+
elif stage == Stage.RECOMMENDATION.value:
|
| 26 |
+
return gptService.getRecommendation(keywords,medical_history)
|
| 27 |
else:
|
| 28 |
print("Unknown stage")
|
| 29 |
raise gr.Error('Unknown stage encountered')
|
|
|
|
| 47 |
# stage_choices = [stage.value for stage in Stage]
|
| 48 |
|
| 49 |
# To add few stages
|
| 50 |
+
stage_choices = [Stage.INITIAL_ASSESSMENT.value,Stage.SHORT_TERM_GOALS.value,Stage.LONG_TERM_GOALS.value, Stage.RECOMMENDATION.value]
|
| 51 |
|
| 52 |
stage = gr.Dropdown(choices=stage_choices, label="Stage")
|
| 53 |
|