Spaces:
Runtime error
Runtime error
fix: minor fix
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import gradio as gr
|
|
| 5 |
import numpy as np
|
| 6 |
import torch
|
| 7 |
import math
|
|
|
|
| 8 |
|
| 9 |
from gradio import inputs
|
| 10 |
from diffusers import (
|
|
@@ -342,7 +343,7 @@ def detect_text(text, state, width, height):
|
|
| 342 |
item = item.strip()
|
| 343 |
if item == "":
|
| 344 |
continue
|
| 345 |
-
if item in state:
|
| 346 |
new_state[item] = {
|
| 347 |
"map": state[item]["map"],
|
| 348 |
"weight": state[item]["weight"],
|
|
|
|
| 5 |
import numpy as np
|
| 6 |
import torch
|
| 7 |
import math
|
| 8 |
+
import re
|
| 9 |
|
| 10 |
from gradio import inputs
|
| 11 |
from diffusers import (
|
|
|
|
| 343 |
item = item.strip()
|
| 344 |
if item == "":
|
| 345 |
continue
|
| 346 |
+
if state is not None and item in state:
|
| 347 |
new_state[item] = {
|
| 348 |
"map": state[item]["map"],
|
| 349 |
"weight": state[item]["weight"],
|