Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,11 +31,11 @@ llm = Llama(model_path="model.gguf",
|
|
31 |
n_ctx=512,
|
32 |
n_threads=2)
|
33 |
|
34 |
-
DOC_PATH = "
|
35 |
|
36 |
print(os.getcwd())
|
37 |
|
38 |
-
documents = SimpleDirectoryReader(input_files=["
|
39 |
|
40 |
parser = SentenceSplitter(chunk_size=128, chunk_overlap=64)
|
41 |
nodes = parser.get_nodes_from_documents(
|
@@ -124,14 +124,14 @@ css = """
|
|
124 |
}
|
125 |
"""
|
126 |
|
127 |
-
def
|
128 |
with gr.Blocks(css=css) as demo:
|
129 |
gr.Markdown("# Think Paraguayo")
|
130 |
gr.Markdown("## Conoce la cultura guaraní!!")
|
131 |
|
132 |
with gr.Row(variant='panel'):
|
133 |
with gr.Column(scale=1):
|
134 |
-
gr.Image(value="
|
135 |
|
136 |
with gr.Column(scale=1):
|
137 |
# with gr.Row():
|
@@ -165,4 +165,5 @@ def main():
|
|
165 |
|
166 |
demo.launch(share=True, inline= False, debug=True)
|
167 |
|
168 |
-
|
|
|
|
31 |
n_ctx=512,
|
32 |
n_threads=2)
|
33 |
|
34 |
+
DOC_PATH = "./think-paraguayo-space-aux/index"
|
35 |
|
36 |
print(os.getcwd())
|
37 |
|
38 |
+
documents = SimpleDirectoryReader(input_files=["./think-paraguayo-space-aux/libro.txt"]).load_data()
|
39 |
|
40 |
parser = SentenceSplitter(chunk_size=128, chunk_overlap=64)
|
41 |
nodes = parser.get_nodes_from_documents(
|
|
|
124 |
}
|
125 |
"""
|
126 |
|
127 |
+
def launcher():
|
128 |
with gr.Blocks(css=css) as demo:
|
129 |
gr.Markdown("# Think Paraguayo")
|
130 |
gr.Markdown("## Conoce la cultura guaraní!!")
|
131 |
|
132 |
with gr.Row(variant='panel'):
|
133 |
with gr.Column(scale=1):
|
134 |
+
gr.Image(value="./think-paraguayo-space-aux/think_paraguayo.jpeg", type="filepath", label="Imagen Estática")
|
135 |
|
136 |
with gr.Column(scale=1):
|
137 |
# with gr.Row():
|
|
|
165 |
|
166 |
demo.launch(share=True, inline= False, debug=True)
|
167 |
|
168 |
+
if __name__ == "__main__":
|
169 |
+
launcher()
|