Kunpeng Song commited on
Commit
e4bf64c
1 Parent(s): 1ea821b
app.py CHANGED
@@ -21,9 +21,8 @@ def MoMA_demo(rgb, subject, prompt, strength, seed):
21
  try:
22
  seed = int(seed)
23
  except ValueError:
24
- seed = np.random.randint(0,1000)
25
- if seed == 0:
26
- seed = np.random.randint(0,1000)
27
  print(f"Seed: {seed}")
28
 
29
  with torch.no_grad():
@@ -50,5 +49,6 @@ gr.Interface(
50
  title=title,
51
  description=description,
52
  article=article,
53
- examples=[["example_images/newImages/3.jpg",'car','A car in autumn with falling leaves.',1.0,"1"],["example_images/newImages/3.jpg",'car','A wooden sculpture of a car in a living room.',0.3,"4"],["example_images/newImages/2.jpg",'car','A car on a city road with trees and buildings.',1.0,"1"],["example_images/newImages/1.jpeg",'bird','A bird in spring with flowers.',1.0,"1"]],
 
54
  ).launch(debug=False)
 
21
  try:
22
  seed = int(seed)
23
  except ValueError:
24
+ seed = 0
25
+ seed = seed if not seed == 0 else np.random.randint(0,1000)
 
26
  print(f"Seed: {seed}")
27
 
28
  with torch.no_grad():
 
49
  title=title,
50
  description=description,
51
  article=article,
52
+ examples=[["example_images/newImages/3.jpg",'car','A car in autumn with falling leaves.',1.0,"6"],["example_images/newImages/3.jpg",'car','A wooden sculpture of a car on a table.',0.4,"4"],["example_images/newImages/2.jpg",'car','A car on a city road with trees and buildings.',1.0,"4"],["example_images/newImages/1.jpeg",'bird','A bird in spring with flowers.',1.0,"1"]],
53
+ allow_flagging='never'
54
  ).launch(debug=False)
flagged/Input RGB/077d773e50de2feb1354087dfc5e13d24d644f05/tmpdedk30g1.jpg DELETED
Binary file (40.9 kB)
 
flagged/Input RGB/295e9eb571bfb4dae8b04061d57e2f553cbdc88d/tmpg5bekvxe.jpg DELETED
Binary file (305 kB)
 
flagged/Output/9dad60153c76f2169d506f8bf7f29e77cfb01c82/tmps_j3zkvr.png DELETED
Binary file (408 kB)
 
flagged/log.csv CHANGED
@@ -1,4 +1,2 @@
1
- Input RGB,subject,Prompt,Strength,Output,flag,username,timestamp
2
- ,,,0.2,,,,2024-05-21 18:52:10.695138
3
- /common/users/ks1418/paper_experiments_users/intern_bytedance/demo/MoMA_demo/flagged/Input RGB/077d773e50de2feb1354087dfc5e13d24d644f05/tmpdedk30g1.jpg,car,A car in autumn with falling leaves.,1,1,,,,2024-05-21 19:16:56.004897
4
- /common/users/ks1418/paper_experiments_users/intern_bytedance/demo/MoMA_demo/flagged/Input RGB/295e9eb571bfb4dae8b04061d57e2f553cbdc88d/tmpg5bekvxe.jpg,bird,A bird in spring with flowers.,1,,/common/users/ks1418/paper_experiments_users/intern_bytedance/demo/MoMA_demo/flagged/Output/9dad60153c76f2169d506f8bf7f29e77cfb01c82/tmps_j3zkvr.png,,,2024-05-21 19:24:12.269082
 
1
+ Input RGB,subject,Prompt,Strength. Recommend: 1.0 for context editing; 0.4 for texture editing,Seed. Use 0 for a random seed,Output,flag,username,timestamp
2
+ ,,,1,,,,,2024-05-21 19:36:27.802622