Spaces:
Sleeping
Sleeping
Commit
·
091ebcc
1
Parent(s):
ce930f8
code changed
Browse files
app.py
CHANGED
|
@@ -1,17 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
!pip install -qq langchain wget llama-index cohere llama-cpp-python
|
| 3 |
-
|
| 4 |
-
import wget
|
| 5 |
-
|
| 6 |
-
def bar_custom(current, total, width=80):
|
| 7 |
-
print("Downloading %d%% [%d / %d] bytes" % (current / total * 100, current, total))
|
| 8 |
-
|
| 9 |
-
model_url = "https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q2_K.gguf"
|
| 10 |
-
wget.download(model_url, bar=bar_custom)
|
| 11 |
-
|
| 12 |
-
!pip -q install streamlit
|
| 13 |
-
|
| 14 |
-
%%writefile app.py
|
| 15 |
import streamlit as st
|
| 16 |
from llama_index import (
|
| 17 |
SimpleDirectoryReader,
|
|
@@ -81,6 +67,4 @@ def main() -> None:
|
|
| 81 |
st.markdown(message.content)
|
| 82 |
|
| 83 |
if __name__ == "__main__":
|
| 84 |
-
main()
|
| 85 |
-
|
| 86 |
-
!streamlit run app.py & npx localtunnel --port 8501
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from llama_index import (
|
| 3 |
SimpleDirectoryReader,
|
|
|
|
| 67 |
st.markdown(message.content)
|
| 68 |
|
| 69 |
if __name__ == "__main__":
|
| 70 |
+
main()
|
|
|
|
|
|