Spaces:
Sleeping
Sleeping
Update app.py
Browse files442 unmodified lines443444445446447448449450451452453442 unmodified linessleep(3)print("Gerando...")res = self.oppo.models.generate_content(model="gemma-3-27b-it", contents=prompt)return res.textexcept Exception as e:print("erro:", e)print("Tentando novamente")def save(self):self.c.save()442 unmodified lines443444445446447448449450451452453454455456457458459460461442 unmodified linessleep(3)print("Gerando...")res = self.oppo.models.generate_content(model="gemma-3-27b-it", contents=prompt)return self.limpar(res.text)except Exception as e:print("erro:", e)print("Tentando novamente")def limpar(self, texto):texto = texto.replace("<img>", "<img>")texto = texto.replace("<p>", "<p>").replace("</p>", "</p>")texto = texto.replace("<div>", "<div>").replace("</div>", "</div>")texto = texto.replace("<h1>", "<h1>").replace("</h1>", "</h1>")return textodef save(self):self.c.save()
app.py+9-1