GurgenGulay commited on
Commit
72c9580
·
verified ·
1 Parent(s): 681fc5d

Update UI.py

Browse files
Files changed (1) hide show
  1. UI.py +14 -9
UI.py CHANGED
@@ -1,30 +1,35 @@
1
  import gradio as gr
2
 
 
3
  css = """
4
- #main {background-color: #f4f7f6; padding: 20px; font-family: 'Arial', sans-serif;}
5
- h1 {color: #2e3b4e; font-size: 24px; font-weight: bold;}
6
- textarea {background-color: #f8f8f8; border: 2px solid #ccc; border-radius: 5px;}
7
- button {background-color: #4CAF50; color: white; border-radius: 5px;}
8
  button:hover {background-color: #45a049;}
9
  """
10
 
11
- # Kullanıcı girişi ve çıktı için arayüzün oluşturulması
 
 
 
 
 
 
12
  title = "Generative Transcript Transformation"
13
  description = """
14
  Bu araç, verilen metni öğretici bir ders metnine dönüştürmek için tasarlanmıştır.
15
  Metni girin ve 30 dakikalık bir ders metni üretin.
16
  """
17
 
18
- img_url = "https://tr.pinterest.com/pin/943152346965605668/"
19
-
20
  iface = gr.Interface(
21
  fn=generate_teaching_transcript,
22
  inputs=gr.Textbox(label="Transcript Metni", lines=15, placeholder="Konuşma metnini buraya girin..."),
23
  outputs="text",
24
  title=title,
25
  description=description,
26
- theme="compact", # Daha kompakt bir görünüm
27
- css=css # Özel stil
28
  )
29
 
30
  # Uygulamayı başlatma
 
1
  import gradio as gr
2
 
3
+ # CSS Style
4
  css = """
5
+ #main {background-color: #f4f7f6; padding: 30px; font-family: 'Arial', sans-serif;}
6
+ h1 {color: #2e3b4e; font-size: 28px; font-weight: bold;}
7
+ textarea {background-color: #f8f8f8; border: 2px solid #ccc; border-radius: 5px; padding: 10px;}
8
+ button {background-color: #4CAF50; color: white; border-radius: 5px; padding: 10px 20px; font-size: 16px;}
9
  button:hover {background-color: #45a049;}
10
  """
11
 
12
+ image = gr.Image(value="https://tr.pinterest.com/pin/943152346965605668/", label="Image")
13
+
14
+ # Fonksiyon ve Arayüz Tanımlaması
15
+ def generate_teaching_transcript(input_text):
16
+ # Burada, 'input_text' ile öğretici metni işleyebilirsiniz.
17
+ return "Öğretici metin burada olacak."
18
+
19
  title = "Generative Transcript Transformation"
20
  description = """
21
  Bu araç, verilen metni öğretici bir ders metnine dönüştürmek için tasarlanmıştır.
22
  Metni girin ve 30 dakikalık bir ders metni üretin.
23
  """
24
 
 
 
25
  iface = gr.Interface(
26
  fn=generate_teaching_transcript,
27
  inputs=gr.Textbox(label="Transcript Metni", lines=15, placeholder="Konuşma metnini buraya girin..."),
28
  outputs="text",
29
  title=title,
30
  description=description,
31
+ theme="compact",
32
+ css=css
33
  )
34
 
35
  # Uygulamayı başlatma