Spaces:
Runtime error
Runtime error
JavierGon12
commited on
Commit
•
cd03817
1
Parent(s):
e77b808
Remove unnecessary libraries and clean code a bit
Browse files- app.py +0 -6
- pages/Question Answering.py +1 -1
- pages/Speech Recognition.py +0 -3
- pages/Summarization.py +0 -1
- pages/Text Classification.py +0 -1
- pages/Text Generation.py +0 -9
app.py
CHANGED
@@ -1,12 +1,6 @@
|
|
1 |
-
# Install libraries
|
2 |
-
|
3 |
import streamlit as st
|
4 |
from PIL import Image
|
5 |
-
import streamlit as st
|
6 |
from transformers import pipeline
|
7 |
-
import pandas as pd
|
8 |
-
import plotly.express as px
|
9 |
-
import matplotlib.pyplot as plt
|
10 |
from pathlib import Path
|
11 |
import base64
|
12 |
from st_pages import Page, add_page_title, show_pages
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
|
|
3 |
from transformers import pipeline
|
|
|
|
|
|
|
4 |
from pathlib import Path
|
5 |
import base64
|
6 |
from st_pages import Page, add_page_title, show_pages
|
pages/Question Answering.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import re
|
2 |
import streamlit as st
|
3 |
from transformers import DonutProcessor, VisionEncoderDecoderModel
|
4 |
-
from datasets import load_dataset
|
5 |
import torch
|
6 |
import os
|
7 |
from PIL import Image
|
@@ -9,6 +8,7 @@ import PyPDF2
|
|
9 |
from pypdf.errors import PdfReadError
|
10 |
from pypdf import PdfReader
|
11 |
import pypdfium2 as pdfium
|
|
|
12 |
processor = DonutProcessor.from_pretrained("naver-clova-ix/donut-base-finetuned-docvqa")
|
13 |
model = VisionEncoderDecoderModel.from_pretrained("naver-clova-ix/donut-base-finetuned-docvqa")
|
14 |
|
|
|
1 |
import re
|
2 |
import streamlit as st
|
3 |
from transformers import DonutProcessor, VisionEncoderDecoderModel
|
|
|
4 |
import torch
|
5 |
import os
|
6 |
from PIL import Image
|
|
|
8 |
from pypdf.errors import PdfReadError
|
9 |
from pypdf import PdfReader
|
10 |
import pypdfium2 as pdfium
|
11 |
+
|
12 |
processor = DonutProcessor.from_pretrained("naver-clova-ix/donut-base-finetuned-docvqa")
|
13 |
model = VisionEncoderDecoderModel.from_pretrained("naver-clova-ix/donut-base-finetuned-docvqa")
|
14 |
|
pages/Speech Recognition.py
CHANGED
@@ -1,8 +1,5 @@
|
|
1 |
-
from transformers import BartForConditionalGeneration, BartTokenizer
|
2 |
import streamlit as st
|
3 |
import torch
|
4 |
-
from transformers import AutoProcessor, WhisperForConditionalGeneration
|
5 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
6 |
import torchaudio
|
7 |
from transformers import pipeline
|
8 |
from streamlit_mic_recorder import mic_recorder,speech_to_text
|
|
|
|
|
1 |
import streamlit as st
|
2 |
import torch
|
|
|
|
|
3 |
import torchaudio
|
4 |
from transformers import pipeline
|
5 |
from streamlit_mic_recorder import mic_recorder,speech_to_text
|
pages/Summarization.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
from transformers import BartForConditionalGeneration, BartTokenizer
|
2 |
import streamlit as st
|
3 |
import torch
|
4 |
-
from transformers import AutoProcessor, WhisperForConditionalGeneration
|
5 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
6 |
import torchaudio
|
7 |
from transformers import pipeline
|
|
|
1 |
from transformers import BartForConditionalGeneration, BartTokenizer
|
2 |
import streamlit as st
|
3 |
import torch
|
|
|
4 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
5 |
import torchaudio
|
6 |
from transformers import pipeline
|
pages/Text Classification.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import re
|
2 |
from transformers import DonutProcessor, VisionEncoderDecoderModel
|
3 |
-
from datasets import load_dataset
|
4 |
import torch
|
5 |
import streamlit as st
|
6 |
from PIL import Image
|
|
|
1 |
import re
|
2 |
from transformers import DonutProcessor, VisionEncoderDecoderModel
|
|
|
3 |
import torch
|
4 |
import streamlit as st
|
5 |
from PIL import Image
|
pages/Text Generation.py
CHANGED
@@ -1,19 +1,10 @@
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
3 |
-
import streamlit as st
|
4 |
-
from transformers import pipeline
|
5 |
-
import pandas as pd
|
6 |
-
import plotly.express as px
|
7 |
-
import matplotlib.pyplot as plt
|
8 |
-
from pathlib import Path
|
9 |
import base64
|
10 |
-
from st_pages import Page, add_page_title, show_pages
|
11 |
-
from streamlit_extras.badges import badge
|
12 |
import transformers
|
13 |
|
14 |
|
15 |
|
16 |
-
|
17 |
model_name = 'Intel/neural-chat-7b-v3-1'
|
18 |
model = transformers.AutoModelForCausalLM.from_pretrained(model_name)
|
19 |
tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
|
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
import base64
|
|
|
|
|
4 |
import transformers
|
5 |
|
6 |
|
7 |
|
|
|
8 |
model_name = 'Intel/neural-chat-7b-v3-1'
|
9 |
model = transformers.AutoModelForCausalLM.from_pretrained(model_name)
|
10 |
tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
|