alexkueck commited on
Commit
17448a6
1 Parent(s): 508cc79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -372,6 +372,7 @@ def generate_auswahl(prompt, file, history, rag_option, model_option, openai_api
372
  print("history zeichnen......................")
373
  print(history)
374
  return history, "Success"
 
375
  else:
376
  result = generate_text(prompt, file, history, rag_option, model_option, openai_api_key, k=3, top_p=0.6, temperature=0.5, max_new_tokens=4048, max_context_length_tokens=2048, repetition_penalty=1.3,)
377
  #Antwort als Stream ausgeben... wenn Textantwort gefordert
@@ -379,7 +380,7 @@ def generate_auswahl(prompt, file, history, rag_option, model_option, openai_api
379
  print(history)
380
  history[-1][1] = result
381
  return history, "Success"
382
- """
383
  for character in result:
384
  history[-1][1] += character
385
  time.sleep(0.03)
@@ -391,7 +392,7 @@ def generate_auswahl(prompt, file, history, rag_option, model_option, openai_api
391
  return
392
  except:
393
  pass
394
- """
395
 
396
  def generate_bild(prompt):
397
  data = {"inputs": prompt}
@@ -500,7 +501,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
500
  with gr.Row():
501
  with gr.Column(scale=5):
502
  with gr.Row():
503
- chatbot = gr.Chatbot(elem_id="chuanhu_chatbot", bubble_full_width=False,)
504
  with gr.Row():
505
  with gr.Column(scale=12):
506
  user_input = gr.Textbox(
 
372
  print("history zeichnen......................")
373
  print(history)
374
  return history, "Success"
375
+ """
376
  else:
377
  result = generate_text(prompt, file, history, rag_option, model_option, openai_api_key, k=3, top_p=0.6, temperature=0.5, max_new_tokens=4048, max_context_length_tokens=2048, repetition_penalty=1.3,)
378
  #Antwort als Stream ausgeben... wenn Textantwort gefordert
 
380
  print(history)
381
  history[-1][1] = result
382
  return history, "Success"
383
+
384
  for character in result:
385
  history[-1][1] += character
386
  time.sleep(0.03)
 
392
  return
393
  except:
394
  pass
395
+ """
396
 
397
  def generate_bild(prompt):
398
  data = {"inputs": prompt}
 
501
  with gr.Row():
502
  with gr.Column(scale=5):
503
  with gr.Row():
504
+ chatbot = gr.Chatbot(elem_id="chuanhu_chatbot",)
505
  with gr.Row():
506
  with gr.Column(scale=12):
507
  user_input = gr.Textbox(