ahmadmac commited on
Commit
8f1c469
·
verified ·
1 Parent(s): aeebdb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -61,12 +61,19 @@ chain = LLMChain(llm=llm, prompt=chat_prompt)
61
  def extract_entities(text):
62
  result = chain.run(text)
63
  return result
 
 
 
 
 
 
 
 
64
 
65
  iface = gr.Interface(
66
  fn=extract_entities,
67
  inputs=gr.Textbox(label="Enter your text"),
68
- #outputs=gr.Markdown(label="Extracted Entities"),
69
- outputs=gr.Textbox(gr.Markdown(label="Extracted Entities")),
70
  title="Entity Extraction Tool",
71
  description="Extract entities from text using Gemini 1.5 Pro."
72
  )
 
61
  def extract_entities(text):
62
  result = chain.run(text)
63
  return result
64
+ css = """
65
+ .output-box {
66
+ border: 2px solid #ddd;
67
+ padding: 15px;
68
+ border-radius: 5px;
69
+ background-color: #f9f9f9;
70
+ }
71
+ """
72
 
73
  iface = gr.Interface(
74
  fn=extract_entities,
75
  inputs=gr.Textbox(label="Enter your text"),
76
+ outputs=gr.Markdown(label="Extracted Entities",elem_id="output-box"),
 
77
  title="Entity Extraction Tool",
78
  description="Extract entities from text using Gemini 1.5 Pro."
79
  )