Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,7 @@ from openai import ChatCompletion
|
|
32 |
from PyPDF2 import PdfReader
|
33 |
from templates import bot_template, css, user_template
|
34 |
from xml.etree import ElementTree as ET
|
|
|
35 |
|
36 |
def add_Med_Licensing_Exam_Dataset():
|
37 |
import streamlit as st
|
@@ -178,7 +179,6 @@ def addDocumentHTML5(result):
|
|
178 |
</html>
|
179 |
'''
|
180 |
|
181 |
-
import streamlit.components.v1 as components # Import Streamlit
|
182 |
components.html(documentHTML5, width=1280, height=1024)
|
183 |
return result
|
184 |
|
@@ -186,7 +186,6 @@ def addDocumentHTML5(result):
|
|
186 |
# 3. Stream Llama Response
|
187 |
# @st.cache_resource
|
188 |
def StreamLLMChatResponse(prompt):
|
189 |
-
|
190 |
try:
|
191 |
endpoint_url = API_URL
|
192 |
hf_token = API_KEY
|
@@ -221,7 +220,8 @@ def StreamLLMChatResponse(prompt):
|
|
221 |
|
222 |
except:
|
223 |
st.write('Stream llm issue')
|
224 |
-
add_documentHTML5(result)
|
|
|
225 |
except:
|
226 |
st.write('Llama model is asleep. Starting up now on A10 - please give 5 minutes then retry as KEDA scales up from zero to activate running container(s).')
|
227 |
|
|
|
32 |
from PyPDF2 import PdfReader
|
33 |
from templates import bot_template, css, user_template
|
34 |
from xml.etree import ElementTree as ET
|
35 |
+
import streamlit.components.v1 as components # Import Streamlit Components for HTML5
|
36 |
|
37 |
def add_Med_Licensing_Exam_Dataset():
|
38 |
import streamlit as st
|
|
|
179 |
</html>
|
180 |
'''
|
181 |
|
|
|
182 |
components.html(documentHTML5, width=1280, height=1024)
|
183 |
return result
|
184 |
|
|
|
186 |
# 3. Stream Llama Response
|
187 |
# @st.cache_resource
|
188 |
def StreamLLMChatResponse(prompt):
|
|
|
189 |
try:
|
190 |
endpoint_url = API_URL
|
191 |
hf_token = API_KEY
|
|
|
220 |
|
221 |
except:
|
222 |
st.write('Stream llm issue')
|
223 |
+
#add_documentHTML5(result)
|
224 |
+
return result
|
225 |
except:
|
226 |
st.write('Llama model is asleep. Starting up now on A10 - please give 5 minutes then retry as KEDA scales up from zero to activate running container(s).')
|
227 |
|