tywei08 commited on
Commit
ea69799
·
verified ·
1 Parent(s): 2b7543b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -12
app.py CHANGED
@@ -42,9 +42,9 @@ def generate_cocktail(mood, sweetness, sour, savory, bitter, flavor_association,
42
  model="gpt-4-0125-preview",
43
  messages=messages,
44
  max_tokens=1024)
45
- return response.choices[0].message.content
46
  except Exception as e:
47
- return str(e)
48
 
49
  # Creating the Gradio interface
50
  with gr.Blocks(css='''
@@ -54,16 +54,6 @@ with gr.Blocks(css='''
54
  .gradio-textbox {
55
  opacity: 0.5; /* Change the opacity of the textbox */
56
  }
57
- .gradio-markdown {
58
- color: white; /* Change text color to white */
59
- font-size: 30px;
60
- }
61
- .slider-sweetness::-webkit-slider-thumb { background: #FAD02E; }
62
- .slider-sour::-webkit-slider-thumb { background: #4CAF50; }
63
- .slider-savory::-webkit-slider-thumb { background: #795548; }
64
- .slider-bitter::-webkit-slider-thumb { background: #F44336; }
65
- .slider-soberness_level::-webkit-slider-thumb { background: #2196F3; }
66
- .output_text { color: white !important; } /* Ensuring output text is white */
67
  ''') as demo:
68
  with gr.Row():
69
  gr.HTML("""
 
42
  model="gpt-4-0125-preview",
43
  messages=messages,
44
  max_tokens=1024)
45
+ return f'<p style="color: white; font-size: 20px;">{response.choices[0].message.content}</p>'
46
  except Exception as e:
47
+ return f'<p style="color: white; font-size: 20px;">{str(e)}</p>'
48
 
49
  # Creating the Gradio interface
50
  with gr.Blocks(css='''
 
54
  .gradio-textbox {
55
  opacity: 0.5; /* Change the opacity of the textbox */
56
  }
 
 
 
 
 
 
 
 
 
 
57
  ''') as demo:
58
  with gr.Row():
59
  gr.HTML("""