Poonawala commited on
Commit
6c9ef1b
·
verified ·
1 Parent(s): 09eca9a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from llm_chain import ask_ai
3
+
4
+ st.title("Medical GPT: Medi 🤖|🩺")
5
+
6
+ llm_name = st.radio(
7
+ "Choose your Model",
8
+ ["4o", "4o-mini"],
9
+ )
10
+
11
+ def generate_response(input_text):
12
+ st.info(ask_ai(
13
+ query=input_text,
14
+ model_name=llm_name
15
+ )
16
+ )
17
+
18
+ with st.form("my_form"):
19
+ text = st.text_area("Enter text:", "What your duties as a doctor?")
20
+ submitted = st.form_submit_button("Submit")
21
+ if submitted:
22
+ generate_response(text)