mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-31 12:20:26 +08:00
Format-The-Codebase
- solve the conflict between black and isort
This commit is contained in:
parent
23af8e559c
commit
6a77a30a4a
@ -49,7 +49,7 @@ jobs:
|
||||
- run:
|
||||
command: |
|
||||
. venv/bin/activate
|
||||
python -m isort --check-only gradio test
|
||||
python -m isort --profile=black --check-only gradio test
|
||||
- run:
|
||||
command: |
|
||||
. venv/bin/activate
|
||||
|
@ -6,11 +6,19 @@ import math
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from pytorch_transformers import (WEIGHTS_NAME, BertConfig,
|
||||
BertForQuestionAnswering, BertTokenizer)
|
||||
from pytorch_transformers import (
|
||||
WEIGHTS_NAME,
|
||||
BertConfig,
|
||||
BertForQuestionAnswering,
|
||||
BertTokenizer,
|
||||
)
|
||||
from torch.utils.data import DataLoader, SequentialSampler, TensorDataset
|
||||
from utils import (get_answer, input_to_squad_example,
|
||||
squad_examples_to_features, to_list)
|
||||
from utils import (
|
||||
get_answer,
|
||||
input_to_squad_example,
|
||||
squad_examples_to_features,
|
||||
to_list,
|
||||
)
|
||||
|
||||
RawResult = collections.namedtuple(
|
||||
"RawResult", ["unique_id", "start_logits", "end_logits"]
|
||||
|
@ -5,8 +5,7 @@ import math
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from pytorch_transformers.tokenization_bert import (BasicTokenizer,
|
||||
whitespace_tokenize)
|
||||
from pytorch_transformers.tokenization_bert import BasicTokenizer, whitespace_tokenize
|
||||
from torch.utils.data import DataLoader, SequentialSampler, TensorDataset
|
||||
|
||||
|
||||
|
@ -1,7 +1,11 @@
|
||||
import pkg_resources
|
||||
|
||||
from gradio.flagging import (CSVLogger, FlaggingCallback,
|
||||
HuggingFaceDatasetSaver, SimpleCSVLogger)
|
||||
from gradio.flagging import (
|
||||
CSVLogger,
|
||||
FlaggingCallback,
|
||||
HuggingFaceDatasetSaver,
|
||||
SimpleCSVLogger,
|
||||
)
|
||||
from gradio.interface import Interface, close_all, reset_all
|
||||
from gradio.mix import Parallel, Series
|
||||
from gradio.routes import get_state, set_state
|
||||
|
@ -6,8 +6,7 @@ import numpy as np
|
||||
import gradio.interpretation
|
||||
import gradio.test_data
|
||||
from gradio import Interface
|
||||
from gradio.processing_utils import (decode_base64_to_image,
|
||||
encode_array_to_base64)
|
||||
from gradio.processing_utils import decode_base64_to_image, encode_array_to_base64
|
||||
|
||||
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user