Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
from transformers.utils import logging
|
|
|
4 |
|
|
|
|
|
5 |
from googletrans import Translator
|
6 |
-
from transformers import ViltProcessor, ViltForQuestionAnswering, T5Tokenizer, T5ForConditionalGeneration
|
7 |
|
8 |
logging.set_verbosity_info()
|
9 |
logger = logging.get_logger("transformers")
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
from transformers.utils import logging
|
4 |
+
from transformers import ViltProcessor, ViltForQuestionAnswering, T5Tokenizer, T5ForConditionalGeneration
|
5 |
|
6 |
+
import httpcore
|
7 |
+
setattr(httpcore, 'SyncHTTPTransport', 'AsyncHTTPProxy') # set SyncHTTPTransport attribute for googletrans dependency
|
8 |
from googletrans import Translator
|
|
|
9 |
|
10 |
logging.set_verbosity_info()
|
11 |
logger = logging.get_logger("transformers")
|