johann22 commited on
Commit
e6784e4
β€’
1 Parent(s): 0346492

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -17,7 +17,7 @@ now = datetime.now()
17
  date_time_str = now.strftime("%Y-%m-%d %H:%M:%S")
18
 
19
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
20
- model = gr.load("models/stabilityai/sdxl-turbo")
21
  history = []
22
 
23
  def infer(txt):
@@ -37,7 +37,7 @@ def run_gpt(in_prompt,history):
37
  print (seed)
38
  generate_kwargs = dict(
39
  temperature=1.0,
40
- max_new_tokens=128,
41
  top_p=0.99,
42
  repetition_penalty=1.0,
43
  do_sample=True,
@@ -65,8 +65,8 @@ def run(purpose,history,model_drop):
65
  out_prompt = f"An Error Occured generating the prompt \n {e}"
66
  yield ("",[(purpose,out_prompt)],None)
67
  try:
68
- #model=loaded_model[int(model_drop)]
69
- out_img=model(f'cat')
70
  print(out_img)
71
  image=f'{base_url}file={out_img}'
72
  uid = uuid.uuid4()
 
17
  date_time_str = now.strftime("%Y-%m-%d %H:%M:%S")
18
 
19
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
20
+ #model = gr.load("models/stabilityai/sdxl-turbo")
21
  history = []
22
 
23
  def infer(txt):
 
37
  print (seed)
38
  generate_kwargs = dict(
39
  temperature=1.0,
40
+ max_new_tokens=256,
41
  top_p=0.99,
42
  repetition_penalty=1.0,
43
  do_sample=True,
 
65
  out_prompt = f"An Error Occured generating the prompt \n {e}"
66
  yield ("",[(purpose,out_prompt)],None)
67
  try:
68
+ model=loaded_model[int(model_drop)]
69
+ out_img=model(out_prompt)
70
  print(out_img)
71
  image=f'{base_url}file={out_img}'
72
  uid = uuid.uuid4()