jonathanagustin commited on
Commit
c498eed
·
verified ·
1 Parent(s): 856f466

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -25,14 +25,6 @@ logger.info(f"DEFAULT_TEMPERATURE: {DEFAULT_TEMPERATURE}")
25
  client = InferenceClient(token=HF_TOKEN) if HF_TOKEN else InferenceClient()
26
  logger.info("InferenceClient initialized")
27
 
28
- # Force dark mode
29
- FORCE_DARK_MODE = """
30
- function() {
31
- if (document.querySelectorAll('.dark').length === 0) {
32
- document.querySelector('body').classList.add('dark');
33
- }
34
- }
35
- """
36
 
37
 
38
  def generate(prompt: str, max_tokens: int, temperature: float) -> str:
@@ -61,7 +53,7 @@ def generate(prompt: str, max_tokens: int, temperature: float) -> str:
61
 
62
  logger.info("Building Gradio interface...")
63
 
64
- with gr.Blocks(title="Text Playground", js=FORCE_DARK_MODE) as demo:
65
  gr.Markdown("# ✍️ Text Playground\nGenerate creative text with powerful language models!")
66
 
67
  prompt = gr.Textbox(
 
25
  client = InferenceClient(token=HF_TOKEN) if HF_TOKEN else InferenceClient()
26
  logger.info("InferenceClient initialized")
27
 
 
 
 
 
 
 
 
 
28
 
29
 
30
  def generate(prompt: str, max_tokens: int, temperature: float) -> str:
 
53
 
54
  logger.info("Building Gradio interface...")
55
 
56
+ with gr.Blocks(title="Text Playground") as demo:
57
  gr.Markdown("# ✍️ Text Playground\nGenerate creative text with powerful language models!")
58
 
59
  prompt = gr.Textbox(