karimaloulou commited on
Commit
61e2487
·
verified ·
1 Parent(s): 700aa07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -3,6 +3,9 @@ from huggingface_hub import InferenceClient
3
  import os
4
  import pandas as pd
5
  from mitreattack.stix20 import MitreAttackData
 
 
 
6
 
7
  # Chemins des fichiers JSON
8
  ics_attack_path = 'ics-attack.json'
@@ -59,7 +62,7 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
59
  demo = gr.ChatInterface(
60
  respond,
61
  additional_inputs=[
62
- gr.Textbox(value=f"""<s>[INST] Given these TTPs: {techniques_str}\n\nfigure out which technique is used in these logs and respond in bullets points and nothing else if there is no TTPs detected just say that there is not TTP detected: [/INST]""", label="System message"),
63
  gr.Slider(minimum=1, maximum=2048, value=1024, step=1, label="Max new tokens"),
64
  gr.Slider(minimum=0.1, maximum=1.0, value=0.1, step=0.1, label="Temperature"),
65
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
 
3
  import os
4
  import pandas as pd
5
  from mitreattack.stix20 import MitreAttackData
6
+ from format_input import detect_log_type
7
+ from descriptions import descriptions
8
+ from testing_input import log_input
9
 
10
  # Chemins des fichiers JSON
11
  ics_attack_path = 'ics-attack.json'
 
62
  demo = gr.ChatInterface(
63
  respond,
64
  additional_inputs=[
65
+ gr.Textbox(value=f"""<s>[INST] Given these TTPs: {techniques_str}\n\n and here are {descriptions}\n\nfigure out which technique is used in these logs and respond in bullets points and nothing else :\n{log_line}\n[/INST]""", label="System message"),
66
  gr.Slider(minimum=1, maximum=2048, value=1024, step=1, label="Max new tokens"),
67
  gr.Slider(minimum=0.1, maximum=1.0, value=0.1, step=0.1, label="Temperature"),
68
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),