SkwarczynskiP commited on
Commit
4f8084e
·
verified ·
1 Parent(s): 783e73c

Reconfigure the examples

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -25,6 +25,14 @@ model_mapping = {
25
  ("roberta-base", "dmitva/human_ai_generated_text - Both AI and Human Data"): "SkwarczynskiP/roberta-base-finetuned-dmitva-AI-and-human-generated"
26
  }
27
 
 
 
 
 
 
 
 
 
28
 
29
  def detect_ai_generated_text(model: str, dataset: str, text: str) -> str:
30
  # Get the fine-tuned model using mapping
@@ -45,14 +53,6 @@ def detect_ai_generated_text(model: str, dataset: str, text: str) -> str:
45
  return f"{label} with confidence {score * 100:.2f}%"
46
 
47
 
48
- # Examples included within the interface
49
- examples = [
50
- ["AI Generated", "ex1"],
51
- ["Human Written", "ex2"],
52
- ["AI Generated", "ex3"],
53
- ["Human Written", "ex4"]
54
- ]
55
-
56
  interface = gr.Interface(
57
  fn=detect_ai_generated_text,
58
  inputs=[
 
25
  ("roberta-base", "dmitva/human_ai_generated_text - Both AI and Human Data"): "SkwarczynskiP/roberta-base-finetuned-dmitva-AI-and-human-generated"
26
  }
27
 
28
+ # Examples included within the interface
29
+ examples = [
30
+ ["ex1"],
31
+ ["ex2"],
32
+ ["ex3"],
33
+ ["ex4"]
34
+ ]
35
+
36
 
37
  def detect_ai_generated_text(model: str, dataset: str, text: str) -> str:
38
  # Get the fine-tuned model using mapping
 
53
  return f"{label} with confidence {score * 100:.2f}%"
54
 
55
 
 
 
 
 
 
 
 
 
56
  interface = gr.Interface(
57
  fn=detect_ai_generated_text,
58
  inputs=[