Ruian7P commited on
Commit
bd2e01e
Β·
1 Parent(s): 54ebe28

add imuru_large

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -28,6 +28,9 @@ model_zoo = {
28
  "imuru_small": {
29
  "repo_id": "Ruian7P/imuru_small",
30
  },
 
 
 
31
  # "emuru_t5_small": {
32
  # "repo_id": "Ruian7P/emuru_result",
33
  # "model_name": "emuru_t5_small_2e-5_ech5"
@@ -36,7 +39,7 @@ model_zoo = {
36
 
37
  model = None
38
 
39
- def load_model(model_name="imuru_small"):
40
  global model
41
 
42
  if model is None:
@@ -71,7 +74,7 @@ def process_image(img):
71
 
72
 
73
  @spaces.GPU
74
- def generate_handwriting(style_image, gen_text, model_name="imuru_small"):
75
  """Generate handwriting in the style of the input image."""
76
  if not gen_text or gen_text.strip() == "":
77
  return None, "❌ Please provide text to generate"
@@ -144,7 +147,7 @@ with gr.Blocks(css=custom_css, title="Imuru") as demo:
144
  model_selector = gr.Dropdown(
145
  label="πŸ€– Select Model",
146
  choices=list(model_zoo.keys()),
147
- value="imuru_small",
148
  interactive=True
149
  )
150
 
 
28
  "imuru_small": {
29
  "repo_id": "Ruian7P/imuru_small",
30
  },
31
+ "imuru_large": {
32
+ "repo_id": "Ruian7P/imuru_large",
33
+ },
34
  # "emuru_t5_small": {
35
  # "repo_id": "Ruian7P/emuru_result",
36
  # "model_name": "emuru_t5_small_2e-5_ech5"
 
39
 
40
  model = None
41
 
42
+ def load_model(model_name="imuru_large"):
43
  global model
44
 
45
  if model is None:
 
74
 
75
 
76
  @spaces.GPU
77
+ def generate_handwriting(style_image, gen_text, model_name="imuru_large"):
78
  """Generate handwriting in the style of the input image."""
79
  if not gen_text or gen_text.strip() == "":
80
  return None, "❌ Please provide text to generate"
 
147
  model_selector = gr.Dropdown(
148
  label="πŸ€– Select Model",
149
  choices=list(model_zoo.keys()),
150
+ value="imuru_large",
151
  interactive=True
152
  )
153