Mathias Lux commited on
Commit
b5bf49f
·
1 Parent(s): f0a7153

changed size of the chat window.

Browse files
Files changed (1) hide show
  1. app.py +23 -2
app.py CHANGED
@@ -51,7 +51,7 @@ def respond(
51
 
52
  for message in client.chat_completion(
53
  messages,
54
- max_tokens=1024, # Fixed value
55
  stream=True,
56
  temperature=0.7, # Fixed value
57
  top_p=0.95, # Fixed value
@@ -61,6 +61,25 @@ def respond(
61
  response += token
62
  yield response
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
  with gr.Blocks(title="AI Biographical Interview Assistant") as demo:
66
  gr.Markdown("# AI Biographical Interview Assistant")
@@ -69,11 +88,13 @@ with gr.Blocks(title="AI Biographical Interview Assistant") as demo:
69
  an in-depth interview about your life experiences. The AI interviewer uses the Socratic method
70
  to ask thoughtful questions and gather information for creating a biographical article.
71
 
72
- Simply start with stating your name and a few facts about your early childhood, and the AI will guide you through the interview process. When finished ask for the final article.
 
73
  """)
74
 
75
  chatbot = gr.ChatInterface(
76
  respond,
 
77
  )
78
 
79
 
 
51
 
52
  for message in client.chat_completion(
53
  messages,
54
+ max_tokens=2048, # Fixed value
55
  stream=True,
56
  temperature=0.7, # Fixed value
57
  top_p=0.95, # Fixed value
 
61
  response += token
62
  yield response
63
 
64
+ # Custom CSS for bigger chat interface
65
+ custom_css = """
66
+ .contain {
67
+ max-width: 90% !important;
68
+ }
69
+ .message-wrap {
70
+ max-height: 700px !important;
71
+ }
72
+ .message {
73
+ font-size: 16px !important;
74
+ }
75
+ .message-body {
76
+ max-width: 90% !important;
77
+ }
78
+ .input-box textarea {
79
+ font-size: 16px !important;
80
+ }
81
+ """
82
+
83
 
84
  with gr.Blocks(title="AI Biographical Interview Assistant") as demo:
85
  gr.Markdown("# AI Biographical Interview Assistant")
 
88
  an in-depth interview about your life experiences. The AI interviewer uses the Socratic method
89
  to ask thoughtful questions and gather information for creating a biographical article.
90
 
91
+ Simply start with stating your name and a few facts about your early childhood, and the AI will guide you through the interview process.
92
+ When finished ask for the final article and the AI will give wrap it up and give you a summary.
93
  """)
94
 
95
  chatbot = gr.ChatInterface(
96
  respond,
97
+ elem_classes="large-chat" # Add a class for additional CSS targeting if needed
98
  )
99
 
100