lionelgarnier commited on
Commit
2836ec9
·
1 Parent(s): 6894e88

test mistral and flux 2

Browse files
Files changed (2) hide show
  1. app.py +4 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -19,13 +19,14 @@ MAX_IMAGE_SIZE = 2048
19
 
20
 
21
  def refine_prompt(prompt):
 
22
  chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3")
23
  messages = [
24
  {"role": "system", "content": "You are a product designer. You will get a basic prompt of product request and you need to imagine a new product design to satisfy that need. Produce an extended description of product front view that will be use by Flux to generate a visual"},
25
- {"role": "user", "content": "a castle schoolbag"},
26
  ]
27
- chatbot(messages)
28
- refined_prompt = chatbot(prompt)
29
  return refined_prompt
30
 
31
  @spaces.GPU()
 
19
 
20
 
21
  def refine_prompt(prompt):
22
+ gr.Info("Starting process")
23
  chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3")
24
  messages = [
25
  {"role": "system", "content": "You are a product designer. You will get a basic prompt of product request and you need to imagine a new product design to satisfy that need. Produce an extended description of product front view that will be use by Flux to generate a visual"},
26
+ {"role": "user", "content": prompt},
27
  ]
28
+ refined_prompt = chatbot(messages)
29
+ gr.Info("Ending process")
30
  return refined_prompt
31
 
32
  @spaces.GPU()
requirements.txt CHANGED
@@ -29,4 +29,5 @@ https://huggingface.co/spaces/JeffreyXiang/TRELLIS/resolve/main/wheels/nvdiffras
29
  accelerate
30
  git+https://github.com/huggingface/diffusers.git
31
  invisible_watermark
32
- sentencepiece
 
 
29
  accelerate
30
  git+https://github.com/huggingface/diffusers.git
31
  invisible_watermark
32
+ sentencepiece
33
+ protobuf