Spaces:
Sleeping
Sleeping
Commit
·
6ad0d2b
1
Parent(s):
3dbe115
Ajustes
Browse files- app.py +4 -1
- requirements.txt +1 -1
app.py
CHANGED
@@ -2,6 +2,9 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
import PyPDF2
|
4 |
|
|
|
|
|
|
|
5 |
# Cargar el modelo de análisis de sentimientos
|
6 |
sentiment_analysis = pipeline("sentiment-analysis", model="nlptown/bert-base-multilingual-uncased-sentiment")
|
7 |
|
@@ -55,7 +58,7 @@ with gr.Blocks() as app:
|
|
55 |
|
56 |
with gr.Column():
|
57 |
gr.Markdown("### Análisis de PDF")
|
58 |
-
pdf_input = gr.File(label="Subir PDF para análisis"
|
59 |
pdf_button = gr.Button("Analizar PDF")
|
60 |
|
61 |
pdf_button.click(pdf_analysis, inputs=pdf_input, outputs=[text_output, slider_output])
|
|
|
2 |
from transformers import pipeline
|
3 |
import PyPDF2
|
4 |
|
5 |
+
# Mostrar versión de Gradio
|
6 |
+
print(f"Versión de Gradio instalada: {gr.__version__}")
|
7 |
+
|
8 |
# Cargar el modelo de análisis de sentimientos
|
9 |
sentiment_analysis = pipeline("sentiment-analysis", model="nlptown/bert-base-multilingual-uncased-sentiment")
|
10 |
|
|
|
58 |
|
59 |
with gr.Column():
|
60 |
gr.Markdown("### Análisis de PDF")
|
61 |
+
pdf_input = gr.File(label="Subir PDF para análisis")
|
62 |
pdf_button = gr.Button("Analizar PDF")
|
63 |
|
64 |
pdf_button.click(pdf_analysis, inputs=pdf_input, outputs=[text_output, slider_output])
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
gradio
|
2 |
transformers
|
3 |
torch
|
4 |
PyPDF2
|
|
|
1 |
+
gradio==3.0
|
2 |
transformers
|
3 |
torch
|
4 |
PyPDF2
|