Spaces:
Running
Running
add warning
Browse files
app.py
CHANGED
@@ -34,7 +34,8 @@ with st.sidebar:
|
|
34 |
logger.info(f"Model changed to {model_choice}.")
|
35 |
systemPrompt = st.radio("Designate a control persona:",options=["Model","Tutor"])
|
36 |
st.session_state.systemPrompt = systemPrompt
|
37 |
-
st.subheader(f"This experience is currently running on {st.session_state.model}")
|
|
|
38 |
# Initialize chat history
|
39 |
if "messages" not in st.session_state:
|
40 |
st.session_state.messages = []
|
@@ -55,12 +56,10 @@ if picture is not None:
|
|
55 |
f.write(picture.getvalue())
|
56 |
|
57 |
# Get image URL
|
58 |
-
base_url = requests.get("https://ipv4.icanhazip.com").text
|
59 |
img_url = f"https://huggingface.co/spaces/butterswords/MM_Math_Helper" + temp_image_path
|
60 |
-
st.write(base_url)
|
61 |
st.write(img_url)
|
62 |
st.image(img_url)
|
63 |
-
|
64 |
-
guidedMM(st.session_state.systemPrompt, img_url)
|
65 |
else:
|
66 |
basicChat()
|
|
|
34 |
logger.info(f"Model changed to {model_choice}.")
|
35 |
systemPrompt = st.radio("Designate a control persona:",options=["Model","Tutor"])
|
36 |
st.session_state.systemPrompt = systemPrompt
|
37 |
+
st.subheader(f"This experience is currently running on {st.session_state.model}.")
|
38 |
+
st.warning("The experience is currently nonfunctional as I attempt to figure out how to expose the image URL to the HF inference API via streamlit...")
|
39 |
# Initialize chat history
|
40 |
if "messages" not in st.session_state:
|
41 |
st.session_state.messages = []
|
|
|
56 |
f.write(picture.getvalue())
|
57 |
|
58 |
# Get image URL
|
59 |
+
base_url = requests.get("https://ipv4.icanhazip.com").text + ":8501"
|
60 |
img_url = f"https://huggingface.co/spaces/butterswords/MM_Math_Helper" + temp_image_path
|
|
|
61 |
st.write(img_url)
|
62 |
st.image(img_url)
|
63 |
+
#guidedMM(st.session_state.systemPrompt, img_url)
|
|
|
64 |
else:
|
65 |
basicChat()
|