ixxan commited on
Commit
4437cf3
1 Parent(s): 01b73d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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")