Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-blecher committed Sep 25, 2022
2 parents 5f35898 + fb70ef8 commit 1b48858
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pix2tex/gui.py
Expand Up @@ -3,11 +3,11 @@
import os
import tempfile
from PyQt5 import QtCore, QtGui
from PyQt5.QtCore import QObject, Qt, pyqtSlot, pyqtSignal, QThread
from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal, QThread
from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtGui import QKeySequence
from PyQt5.QtWidgets import QMainWindow, QApplication, QMessageBox, QVBoxLayout, QWidget, QShortcut,\
QPushButton, QTextEdit, QLineEdit, QFormLayout, QHBoxLayout, QCheckBox, QSpinBox, QDoubleSpinBox
QPushButton, QTextEdit, QFormLayout, QHBoxLayout, QDoubleSpinBox
from pix2tex.resources import resources
from pynput.mouse import Controller

Expand Down Expand Up @@ -108,7 +108,7 @@ def toggleProcessing(self, value=None):
self.snipButton.setText(text)
self.snipButton.clicked.disconnect()
self.snipButton.clicked.connect(func)
self.displayPrediction()
self.displayPrediction()

@pyqtSlot()
def onClick(self):
Expand Down Expand Up @@ -306,6 +306,8 @@ def mouseReleaseEvent(self, event):

def main(arguments):
with in_model_path():
if os.name != 'nt':
os.environ['QTWEBENGINE_DISABLE_SANDBOX'] = '1'
app = QApplication(sys.argv)
ex = App(arguments)
sys.exit(app.exec_())
sys.exit(app.exec())

0 comments on commit 1b48858

Please sign in to comment.