vericudebuget commited on
Commit
b32ed28
·
verified ·
1 Parent(s): 99d9e8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -34,13 +34,6 @@ def generate(prompt, history, system_prompt, temperature=0.9, max_new_tokens=904
34
  yield output
35
  return output
36
 
37
- for response in stream:
38
- output += response.token.text
39
- if "http" in output: # assuming the AI writes a direct image link in its response
40
- yield {"image": output} # Gradio will display the image
41
- else:
42
- yield output
43
-
44
  additional_inputs = [
45
  gr.Textbox(label="System Prompt", max_lines=1, interactive=True),
46
  gr.Slider(label="Temperature", value=0.9, minimum=0.0, maximum=1.0, step=0.05, interactive=True, info="Higher values produce more diverse outputs"),
@@ -51,9 +44,10 @@ additional_inputs = [
51
 
52
  gr.ChatInterface(
53
  fn=generate,
54
- chatbot=gr.Chatbot(show_label=False, show_share_button=True, show_copy_button=True, likeable=True, layout="panel"),
55
  additional_inputs=additional_inputs,
56
  title="ConvoLite",
 
57
  concurrency_limit=20,
58
-
59
- ).launch(show_api=False,)
 
34
  yield output
35
  return output
36
 
 
 
 
 
 
 
 
37
  additional_inputs = [
38
  gr.Textbox(label="System Prompt", max_lines=1, interactive=True),
39
  gr.Slider(label="Temperature", value=0.9, minimum=0.0, maximum=1.0, step=0.05, interactive=True, info="Higher values produce more diverse outputs"),
 
44
 
45
  gr.ChatInterface(
46
  fn=generate,
47
+ chatbot=gr.Chatbot(show_label=True, show_share_button=True, show_copy_button=True, likeable=True, layout="panel"),
48
  additional_inputs=additional_inputs,
49
  title="ConvoLite",
50
+ description="Remember! The AI might give incorrect information about people, locations, history, etc...",
51
  concurrency_limit=20,
52
+ theme="theme.css" # Add this line to specify the path to your CSS file
53
+ ).launch(show_api=False)