LIU, Zichen commited on
Commit
bda0f89
2 Parent(s): 89e88bc d3d4fc1

Merge branch 'main' of https://huggingface.co./spaces/AI4Editing/MagicQuill

Browse files
Files changed (2) hide show
  1. README.md +3 -2
  2. app.py +7 -6
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: MagicQuill
3
- emoji: 📉
4
  colorFrom: purple
5
  colorTo: yellow
6
  sdk: gradio
@@ -9,5 +9,6 @@ app_file: app.py
9
  pinned: false
10
  license: cc-by-nc-4.0
11
  ---
 
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
  title: MagicQuill
3
+ emoji: 🪶
4
  colorFrom: purple
5
  colorTo: yellow
6
  sdk: gradio
 
9
  pinned: false
10
  license: cc-by-nc-4.0
11
  ---
12
+ The paper is [MagicQuill: An Intelligent Interactive Image Editing System](https://huggingface.co/papers/2411.09703).
13
 
14
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference.
app.py CHANGED
@@ -25,8 +25,9 @@ import os
25
  import requests
26
 
27
  snapshot_download(repo_id="LiuZichen/MagicQuill-models", repo_type="model", local_dir="models")
28
- HF_TOKEN = os.environ.get("HF_TOKEN")
29
- client = Client("LiuZichen/DrawNGuess", hf_token=HF_TOKEN)
 
30
  scribbleColorEditModel = ScribbleColorEditModel()
31
 
32
  def tensor_to_numpy(tensor):
@@ -200,7 +201,7 @@ with gr.Blocks(css=css) as demo:
200
  text = gr.Markdown(
201
  """
202
  # Welcome to MagicQuill!
203
- Click the [link](https://magicquill.art) to view our demo and tutorial.
204
  """)
205
  with gr.Row(elem_classes="row"):
206
  ms = MagicQuill(theme="light")
@@ -303,10 +304,10 @@ with gr.Blocks(css=css) as demo:
303
  with gr.Row(elem_classes="row"):
304
  text = gr.Markdown(
305
  """
306
- Note: This demo is governed by the license of CC BY-NC 4.0 We strongly advise users not to knowingly generate or allow others to knowingly generate harmful content, including hate speech, violence, pornography, deception, etc. (注:本演示受CC BY-NC的许可协议限制。我们强烈建议,用户不应传播及不应允许他人传播以下内容,包括但不限于仇恨言论、暴力、色情、欺诈相关的有害信息。)
307
  """)
308
-
309
- demo.queue(max_size=20, status_update_rate=0.1)
310
  app = FastAPI()
311
 
312
  @app.post("/magic_quill/guess_prompt")
 
25
  import requests
26
 
27
  snapshot_download(repo_id="LiuZichen/MagicQuill-models", repo_type="model", local_dir="models")
28
+ # HF_TOKEN = os.environ.get("HF_TOKEN")
29
+ # The client has been made public. Welcome to duplicate our repo.
30
+ client = Client("LiuZichen/DrawNGuess")
31
  scribbleColorEditModel = ScribbleColorEditModel()
32
 
33
  def tensor_to_numpy(tensor):
 
201
  text = gr.Markdown(
202
  """
203
  # Welcome to MagicQuill!
204
+ Click the [link](https://magicquill.art) to view our demo and tutorial. Give us a [GitHub star](https://github.com/magic-quill/magicquill) if you are interested.
205
  """)
206
  with gr.Row(elem_classes="row"):
207
  ms = MagicQuill(theme="light")
 
304
  with gr.Row(elem_classes="row"):
305
  text = gr.Markdown(
306
  """
307
+ Note: This demo is governed by the license of CC BY-NC 4.0. We strongly advise users not to knowingly generate or allow others to knowingly generate harmful content, including hate speech, violence, pornography, deception, etc. (注:本演示受CC BY-NC的许可协议限制。我们强烈建议,用户不应传播及不应允许他人传播以下内容,包括但不限于仇恨言论、暴力、色情、欺诈相关的有害信息。)
308
  """)
309
+ demo.queue(max_size=20, status_update_rate=0.1)
310
+
311
  app = FastAPI()
312
 
313
  @app.post("/magic_quill/guess_prompt")