doropiza commited on
Commit
be89d73
·
1 Parent(s): e1ff8f3
Files changed (1) hide show
  1. app.py +16 -2
app.py CHANGED
@@ -127,6 +127,20 @@ def respond(message, history):
127
  out = model.generate(**inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
128
  return tokenizer.decode(out[0], skip_special_tokens=True)
129
 
130
- iface = gr.ChatInterface(fn=respond, title="Gemma-ZeroGPU Demo")
 
 
 
 
 
 
 
 
 
 
131
  if __name__ == "__main__":
132
- iface.launch()
 
 
 
 
 
127
  out = model.generate(**inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
128
  return tokenizer.decode(out[0], skip_special_tokens=True)
129
 
130
+ iface = gr.ChatInterface(
131
+ fn=respond,
132
+ title="Gemma-ZeroGPU Demo",
133
+ chatbot=gr.Chatbot(
134
+ type="messages",
135
+ height=600,
136
+ show_copy_button=True,
137
+ show_share_button=True
138
+ )
139
+ )
140
+
141
  if __name__ == "__main__":
142
+ iface.launch(
143
+ server_name="0.0.0.0",
144
+ server_port=7860,
145
+ share=True
146
+ )