Spaces:
Sleeping
Sleeping
Ayush Mangal
commited on
Commit
Β·
f22c143
1
Parent(s):
35afc76
Minor
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ from bs4 import BeautifulSoup
|
|
17 |
|
18 |
st.set_page_config(page_title="π¦π Ask a LLM to know more about me")
|
19 |
st.title('π¦π Ask a LLM to know more about me')
|
|
|
20 |
|
21 |
def has_numbers(inputString):
|
22 |
return any(char.isdigit() for char in inputString)
|
@@ -112,12 +113,12 @@ def generate_response(topic, query_chain):
|
|
112 |
# print(result)
|
113 |
return st.info(result['result'])
|
114 |
|
|
|
|
|
115 |
with st.form('myform'):
|
116 |
topic_text = st.text_input('Enter keyword:', '')
|
117 |
submitted = st.form_submit_button('Submit')
|
118 |
if submitted :
|
119 |
-
os.environ["REPLICATE_API_TOKEN"] = st.secrets["REPLICATE_API_TOKEN"]
|
120 |
-
query_chain = get_query_chain()
|
121 |
generate_response(topic_text, query_chain)
|
122 |
|
123 |
|
|
|
17 |
|
18 |
st.set_page_config(page_title="π¦π Ask a LLM to know more about me")
|
19 |
st.title('π¦π Ask a LLM to know more about me')
|
20 |
+
os.environ["REPLICATE_API_TOKEN"] = st.secrets["REPLICATE_API_TOKEN"]
|
21 |
|
22 |
def has_numbers(inputString):
|
23 |
return any(char.isdigit() for char in inputString)
|
|
|
113 |
# print(result)
|
114 |
return st.info(result['result'])
|
115 |
|
116 |
+
query_chain = get_query_chain()
|
117 |
+
|
118 |
with st.form('myform'):
|
119 |
topic_text = st.text_input('Enter keyword:', '')
|
120 |
submitted = st.form_submit_button('Submit')
|
121 |
if submitted :
|
|
|
|
|
122 |
generate_response(topic_text, query_chain)
|
123 |
|
124 |
|