Spaces:
Runtime error
Runtime error
Upload 7 files
Browse files- .gitattributes +1 -0
- Explicacion-Estructura.png +0 -0
- mistral-7b-instruct-v0.1.Q4_K_M.gguf +3 -0
- requirements.txt +12 -0
- static/Mistral.png +0 -0
- static/streamlit.png +0 -0
- templatesStreamlit.py +206 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
mistral-7b-instruct-v0.1.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
Explicacion-Estructura.png
ADDED
mistral-7b-instruct-v0.1.Q4_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:14466f9d658bf4a79f96c3f3f22759707c291cac4e62fea625e80c7d32169991
|
3 |
+
size 4368438944
|
requirements.txt
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
streamlit
|
2 |
+
langchain
|
3 |
+
torch
|
4 |
+
accelerate
|
5 |
+
sentence_transformers
|
6 |
+
streamlit
|
7 |
+
streamlit_chat
|
8 |
+
faiss-cpu
|
9 |
+
tiktoken
|
10 |
+
huggingface-hub
|
11 |
+
pypdf
|
12 |
+
ctransformers
|
static/Mistral.png
ADDED
static/streamlit.png
ADDED
templatesStreamlit.py
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
css = '''
|
2 |
+
<style>
|
3 |
+
.chat-message {
|
4 |
+
padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1rem; display: flex
|
5 |
+
}
|
6 |
+
.chat-message.user {
|
7 |
+
background-color: #2b313e
|
8 |
+
}
|
9 |
+
.chat-message.bot {
|
10 |
+
background-color: #475063
|
11 |
+
}
|
12 |
+
.chat-message .avatar {
|
13 |
+
width: 20%;
|
14 |
+
}
|
15 |
+
.chat-message .avatar img {
|
16 |
+
max-width: 78px;
|
17 |
+
max-height: 78px;
|
18 |
+
border-radius: 50%;
|
19 |
+
object-fit: cover;
|
20 |
+
}
|
21 |
+
.chat-message .message {
|
22 |
+
width: 80%;
|
23 |
+
padding: 0 1.5rem;
|
24 |
+
color: #fff;
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
.main {
|
29 |
+
padding: 2rem;
|
30 |
+
}
|
31 |
+
|
32 |
+
.skill {
|
33 |
+
background-color: rgb(59, 59, 59);
|
34 |
+
padding: 1rem 2rem;
|
35 |
+
border-radius: 2rem;
|
36 |
+
display: flex;
|
37 |
+
justify-content: space-between;
|
38 |
+
align-items: center;
|
39 |
+
margin-top: 2rem;
|
40 |
+
box-shadow: 0 4px 8px 0 rgba(255, 255, 255, 0.3);
|
41 |
+
transition: .3s;
|
42 |
+
}
|
43 |
+
|
44 |
+
.skill:hover {
|
45 |
+
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
|
46 |
+
}
|
47 |
+
|
48 |
+
.skill-content {
|
49 |
+
display: flex;
|
50 |
+
align-items: center;
|
51 |
+
width: 80%;
|
52 |
+
}
|
53 |
+
|
54 |
+
.skill-img-box {
|
55 |
+
position: relative;
|
56 |
+
min-width: 140px;
|
57 |
+
height: 140px;
|
58 |
+
margin-right: 2rem;
|
59 |
+
border-radius: 1rem;
|
60 |
+
background-size: cover; /* Ajusta el tamaño de la imagen para cubrir completamente el contenedor */
|
61 |
+
background-position: center; /* Centra la imagen en el contenedor */
|
62 |
+
}
|
63 |
+
|
64 |
+
.skill-img-box img {
|
65 |
+
width: 100%; /* Asegura que la imagen ocupe todo el espacio disponible en el contenedor */
|
66 |
+
height: 100%;
|
67 |
+
border-radius: 1rem;
|
68 |
+
object-fit: cover; /* Ajusta el tamaño de la imagen manteniendo la proporción */
|
69 |
+
}
|
70 |
+
|
71 |
+
.skill-detail {
|
72 |
+
width: 100%;
|
73 |
+
}
|
74 |
+
|
75 |
+
.skill-progress {
|
76 |
+
position: relative;
|
77 |
+
height: 1rem;
|
78 |
+
width: 100%;
|
79 |
+
background-color: rgba(255, 255, 255, 0.5);
|
80 |
+
border-radius: 1rem;
|
81 |
+
overflow: hidden;
|
82 |
+
}
|
83 |
+
|
84 |
+
.progress {
|
85 |
+
position: absolute;
|
86 |
+
top: 0;
|
87 |
+
left: 0;
|
88 |
+
height: 100%;
|
89 |
+
background-color: #ffffff;
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
.chat-row {
|
94 |
+
display: flex;
|
95 |
+
margin: 5px;
|
96 |
+
width: 100%;
|
97 |
+
}
|
98 |
+
|
99 |
+
.row-reverse {
|
100 |
+
flex-direction: row-reverse;
|
101 |
+
}
|
102 |
+
|
103 |
+
.chat-box {
|
104 |
+
max-width: 400px;
|
105 |
+
margin: 20px auto;
|
106 |
+
background-color: #8a8787;
|
107 |
+
border-radius: 8px;
|
108 |
+
overflow: hidden;
|
109 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
.chat-bubble {
|
114 |
+
font-family: "Source Sans Pro", sans-serif, "Segoe UI", "Roboto", sans-serif;
|
115 |
+
border: 1px solid transparent;
|
116 |
+
padding: 5px 10px;
|
117 |
+
margin: 0px 7px;
|
118 |
+
max-width: 70%;
|
119 |
+
}
|
120 |
+
|
121 |
+
.ai-bubble {
|
122 |
+
background: rgb(153, 153, 153);
|
123 |
+
border-radius: 10px;
|
124 |
+
}
|
125 |
+
|
126 |
+
.human-bubble {
|
127 |
+
background: linear-gradient(135deg, rgb(0, 178, 255) 0%, rgb(0, 106, 255) 100%);
|
128 |
+
color: white;
|
129 |
+
border-radius: 20px;
|
130 |
+
}
|
131 |
+
|
132 |
+
.chat-icon {
|
133 |
+
border-radius: 5px;
|
134 |
+
}
|
135 |
+
|
136 |
+
.container-neon {
|
137 |
+
display: flex;
|
138 |
+
align-items: center;
|
139 |
+
justify-content: center;
|
140 |
+
height: 100vh; /* Ajusta la altura según tus necesidades o utiliza otro método para centrar verticalmente */
|
141 |
+
}
|
142 |
+
|
143 |
+
.btn-neon {
|
144 |
+
position: relative;
|
145 |
+
display: inline-block;
|
146 |
+
padding: 15px 30px;
|
147 |
+
color: #fff;
|
148 |
+
letter-spacing: 4px;
|
149 |
+
text-decoration: none;
|
150 |
+
font-size: 44px;
|
151 |
+
overflow: hidden;
|
152 |
+
border-radius: 15px;
|
153 |
+
# background: #a945c7;
|
154 |
+
# box-shadow: 0 0 10px #a945c7, 0 0 40px #a945c7, 0 0 80px #a945c7;
|
155 |
+
transition: 0.2s;
|
156 |
+
text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.8);
|
157 |
+
}
|
158 |
+
|
159 |
+
.icon img {
|
160 |
+
margin-right: 1px; /* Ajusta el espacio entre la imagen y el texto según tus necesidades */
|
161 |
+
width: 30px; /* Ajusta el ancho de la imagen según tus necesidades */
|
162 |
+
height: 30px; /* Ajusta la altura de la imagen según tus necesidades */
|
163 |
+
}
|
164 |
+
|
165 |
+
|
166 |
+
'''
|
167 |
+
|
168 |
+
bot_template = '''
|
169 |
+
<div class="chat-message bot">
|
170 |
+
<div class="avatar">
|
171 |
+
<img src="https://i.ibb.co/cN0nmSj/Screenshot-2023-05-28-at-02-37-21.png" style="max-height: 78px; max-width: 78px; border-radius: 50%; object-fit: cover;">
|
172 |
+
</div>
|
173 |
+
<div class="message">{{MSG}}</div>
|
174 |
+
</div>
|
175 |
+
'''
|
176 |
+
bot_template2 = '''
|
177 |
+
|
178 |
+
<div class="chat-row">
|
179 |
+
<img class="chat-icon" src="https://i.ibb.co/cN0nmSj/Screenshot-2023-05-28-at-02-37-21.png" width=45 height=45>
|
180 |
+
<div class="chat-bubble ai-bubble">
|
181 |
+
​{{MSG}}
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
|
185 |
+
'''
|
186 |
+
user_template2 = '''
|
187 |
+
|
188 |
+
<div class="chat-row row-reverse">
|
189 |
+
<img class="chat-icon" src="https://i.ibb.co/rdZC7LZ/Photo-logo-1.png" width=45 height=45>
|
190 |
+
<div class="chat-bubble human-bubble">
|
191 |
+
​{{MSG}}
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
|
195 |
+
'''
|
196 |
+
|
197 |
+
|
198 |
+
|
199 |
+
user_template = '''
|
200 |
+
<div class="chat-message user">
|
201 |
+
<div class="avatar">
|
202 |
+
<img src="https://i.ibb.co/rdZC7LZ/Photo-logo-1.png">
|
203 |
+
</div>
|
204 |
+
<div class="message">{{MSG}}</div>
|
205 |
+
</div>
|
206 |
+
'''
|