svjack commited on
Commit
77d3dcd
·
1 Parent(s): ab767b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -1,8 +1,13 @@
1
  #from summary_reverse_pred_native import *
2
  #### daspartho/prompt-extend
3
 
 
 
 
 
 
4
  import gradio as gr
5
- import os
6
  from predict import *
7
 
8
  #device = "cuda:0"
@@ -58,6 +63,15 @@ example_sample = [
58
  #[text1, False],
59
  ]
60
 
 
 
 
 
 
 
 
 
 
61
  def demo_func(prefix, do_sample):
62
  #l = simple_pred(prefix, do_sample = do_sample)
63
  x = stdf_prompt_expander(prefix, do_sample = do_sample)
@@ -72,7 +86,8 @@ demo = gr.Interface(
72
  ],
73
  outputs="json",
74
  title=f"Stable Diffusion Chinese Prompt Extend 🐰 demonstration",
75
- description = 'This _example_ was **drive** from <br/><b><h4>[https://github.com/svjack/Stable-Diffusion-Chinese-Extend](https://github.com/svjack/Stable-Diffusion-Chinese-Extend)</h4></b>\n',
 
76
  examples=example_sample if example_sample else None,
77
  cache_examples = False
78
  )
 
1
  #from summary_reverse_pred_native import *
2
  #### daspartho/prompt-extend
3
 
4
+ import os
5
+ os.system("pip install huggingface_hub")
6
+
7
+ from huggingface_hub import space_info
8
+
9
  import gradio as gr
10
+ #import os
11
  from predict import *
12
 
13
  #device = "cuda:0"
 
63
  #[text1, False],
64
  ]
65
 
66
+ markdown_exp_size = "##"
67
+ lora_repo = "svjack/chatglm3-few-shot"
68
+ lora_repo_link = "svjack/chatglm3-few-shot/?input_list_index=9"
69
+ emoji_info = space_info(lora_repo).__dict__["cardData"]["emoji"]
70
+ space_cnt = 1
71
+ task_name = "[---Stable Diffusion Chinese Prompt Extend---]"
72
+ description = f"{markdown_exp_size} {task_name} few shot prompt in ChatGLM3 Few Shot space repo (click submit to activate) : [{lora_repo_link}](https://huggingface.co/spaces/{lora_repo_link}) {emoji_info}"
73
+
74
+
75
  def demo_func(prefix, do_sample):
76
  #l = simple_pred(prefix, do_sample = do_sample)
77
  x = stdf_prompt_expander(prefix, do_sample = do_sample)
 
86
  ],
87
  outputs="json",
88
  title=f"Stable Diffusion Chinese Prompt Extend 🐰 demonstration",
89
+ #description = 'This _example_ was **drive** from <br/><b><h4>[https://github.com/svjack/Stable-Diffusion-Chinese-Extend](https://github.com/svjack/Stable-Diffusion-Chinese-Extend)</h4></b>\n',
90
+ description = description,
91
  examples=example_sample if example_sample else None,
92
  cache_examples = False
93
  )