Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -346,14 +346,22 @@ def get_zip_download_link(zip_file):
|
|
| 346 |
return href
|
| 347 |
|
| 348 |
def main():
|
|
|
|
|
|
|
| 349 |
st.title(" DrLlama7B")
|
| 350 |
prompt = f"Write ten funny jokes that are tweet length stories that make you laugh. Show as markdown outline with emojis for each."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
example_input = st.text_input("Enter your example text:", value=prompt)
|
| 352 |
if st.button("Run Prompt With Dr Llama"):
|
| 353 |
try:
|
| 354 |
StreamLLMChatResponse(example_input)
|
| 355 |
except:
|
| 356 |
st.write('Dr. Llama is asleep. Starting up now on A10 - please give 5 minutes then retry as KEDA scales up from zero to activate running container(s).')
|
|
|
|
|
|
|
| 357 |
openai.api_key = os.getenv('OPENAI_KEY')
|
| 358 |
menu = ["txt", "htm", "xlsx", "csv", "md", "py"]
|
| 359 |
choice = st.sidebar.selectbox("Output File Type:", menu)
|
|
|
|
| 346 |
return href
|
| 347 |
|
| 348 |
def main():
|
| 349 |
+
|
| 350 |
+
|
| 351 |
st.title(" DrLlama7B")
|
| 352 |
prompt = f"Write ten funny jokes that are tweet length stories that make you laugh. Show as markdown outline with emojis for each."
|
| 353 |
+
|
| 354 |
+
# Add Wit and Humor buttons
|
| 355 |
+
add_witty_humor_buttons()
|
| 356 |
+
|
| 357 |
example_input = st.text_input("Enter your example text:", value=prompt)
|
| 358 |
if st.button("Run Prompt With Dr Llama"):
|
| 359 |
try:
|
| 360 |
StreamLLMChatResponse(example_input)
|
| 361 |
except:
|
| 362 |
st.write('Dr. Llama is asleep. Starting up now on A10 - please give 5 minutes then retry as KEDA scales up from zero to activate running container(s).')
|
| 363 |
+
|
| 364 |
+
|
| 365 |
openai.api_key = os.getenv('OPENAI_KEY')
|
| 366 |
menu = ["txt", "htm", "xlsx", "csv", "md", "py"]
|
| 367 |
choice = st.sidebar.selectbox("Output File Type:", menu)
|